-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
1,410 additions
and
366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
backend/move/src/main/java/com/example/move/mapper/StaffMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.example.move.mapper; | ||
|
||
import com.example.move.pojo.Staff; | ||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
import org.apache.ibatis.annotations.Mapper; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author liuwe | ||
* @description 针对表【staff(管理员端,公司人员表)】的数据库操作Mapper | ||
* @createDate 2024-08-21 19:30:29 | ||
* @Entity com.example.move.pojo.Staff | ||
*/ | ||
@Mapper | ||
public interface StaffMapper extends BaseMapper<Staff> { | ||
|
||
List<Staff> staffNameByStaffid(int staffid); | ||
|
||
} | ||
|
||
|
||
|
||
|
53 changes: 53 additions & 0 deletions
53
backend/move/src/main/java/com/example/move/pojo/CarProjectMove.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package com.example.move.pojo; | ||
|
||
|
||
import com.baomidou.mybatisplus.annotation.TableId; | ||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.Date; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class CarProjectMove { | ||
|
||
/** | ||
* 汽车id | ||
*/ | ||
@TableId | ||
private Integer carId; | ||
|
||
/** | ||
* 车辆名称 | ||
*/ | ||
private String carName; | ||
|
||
/** | ||
* 车牌号 | ||
*/ | ||
private String carNumber; | ||
|
||
/** | ||
* 车辆头像 | ||
*/ | ||
private byte[] carImage; | ||
/** | ||
* 车辆使用起始时间 | ||
*/ | ||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") | ||
private Date carStartTime; | ||
|
||
/** | ||
* 车辆使用截止时间 | ||
*/ | ||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd") | ||
private Date carEndTime; | ||
|
||
/** | ||
* 姓名 | ||
*/ | ||
private String name; | ||
} |
60 changes: 60 additions & 0 deletions
60
backend/move/src/main/java/com/example/move/pojo/Staff.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package com.example.move.pojo; | ||
|
||
import com.baomidou.mybatisplus.annotation.IdType; | ||
import com.baomidou.mybatisplus.annotation.TableField; | ||
import com.baomidou.mybatisplus.annotation.TableId; | ||
import com.baomidou.mybatisplus.annotation.TableName; | ||
import java.io.Serializable; | ||
import lombok.Data; | ||
|
||
/** | ||
* 管理员端,公司人员表 | ||
* @TableName staff | ||
*/ | ||
@TableName(value ="staff") | ||
@Data | ||
public class Staff implements Serializable { | ||
/** | ||
* 职工id | ||
*/ | ||
@TableId(type = IdType.AUTO) | ||
private Integer staffId; | ||
|
||
/** | ||
* 职工类型 | ||
*/ | ||
private String staffType; | ||
|
||
/** | ||
* 职工姓名 | ||
*/ | ||
private String staffName; | ||
|
||
/** | ||
* 职工身份证 | ||
*/ | ||
private String staffIdNo; | ||
|
||
/** | ||
* 职工手机号 | ||
*/ | ||
private String staffPhoneNo; | ||
|
||
/** | ||
* 职工微信号 | ||
*/ | ||
private String staffWechatNo; | ||
|
||
/** | ||
* 职工职位 | ||
*/ | ||
private String staffPos; | ||
|
||
/** | ||
* 职工状态(0:离职,1:正常) | ||
*/ | ||
private String staffStatus; | ||
|
||
@TableField(exist = false) | ||
private static final long serialVersionUID = 1L; | ||
} |
17 changes: 17 additions & 0 deletions
17
backend/move/src/main/java/com/example/move/service/StaffService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.example.move.service; | ||
|
||
import com.example.move.pojo.Staff; | ||
import com.baomidou.mybatisplus.extension.service.IService; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author liuwe | ||
* @description 针对表【staff(管理员端,公司人员表)】的数据库操作Service | ||
* @createDate 2024-08-21 19:30:29 | ||
*/ | ||
public interface StaffService extends IService<Staff> { | ||
|
||
List<Staff> staffNameByStaffid(int staffid); | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
backend/move/src/main/java/com/example/move/service/impl/StaffServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.example.move.service.impl; | ||
|
||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
import com.example.move.pojo.Staff; | ||
import com.example.move.service.StaffService; | ||
import com.example.move.mapper.StaffMapper; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author liuwe | ||
* @description 针对表【staff(管理员端,公司人员表)】的数据库操作Service实现 | ||
* @createDate 2024-08-21 19:30:29 | ||
*/ | ||
@Service | ||
public class StaffServiceImpl extends ServiceImpl<StaffMapper, Staff> | ||
implements StaffService{ | ||
|
||
@Autowired | ||
private StaffMapper staffMapper; | ||
@Override | ||
public List<Staff> staffNameByStaffid(int staffid) { | ||
return staffMapper.staffNameByStaffid(staffid); | ||
} | ||
} | ||
|
||
|
||
|
||
|
24 changes: 24 additions & 0 deletions
24
backend/move/src/main/java/generator/com/example/move/Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package generator.com.example.move; | ||
|
||
import com.baomidou.mybatisplus.annotation.IdType; | ||
import com.baomidou.mybatisplus.annotation.TableField; | ||
import com.baomidou.mybatisplus.annotation.TableId; | ||
import com.baomidou.mybatisplus.annotation.TableName; | ||
import java.io.Serializable; | ||
import lombok.Data; | ||
|
||
/** | ||
* | ||
* @TableName test | ||
*/ | ||
@TableName(value ="test") | ||
@Data | ||
public class Test implements Serializable { | ||
/** | ||
* | ||
*/ | ||
private Integer columnName; | ||
|
||
@TableField(exist = false) | ||
private static final long serialVersionUID = 1L; | ||
} |
18 changes: 18 additions & 0 deletions
18
backend/move/src/main/java/generator/mapper/TestMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package generator.mapper; | ||
|
||
import generator.com.example.move.Test; | ||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
|
||
/** | ||
* @author liuwe | ||
* @description 针对表【test】的数据库操作Mapper | ||
* @createDate 2024-08-21 19:20:09 | ||
* @Entity generator.com.example.move.Test | ||
*/ | ||
public interface TestMapper extends BaseMapper<Test> { | ||
|
||
} | ||
|
||
|
||
|
||
|
13 changes: 13 additions & 0 deletions
13
backend/move/src/main/java/generator/service/TestService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package generator.service; | ||
|
||
import generator.com.example.move.Test; | ||
import com.baomidou.mybatisplus.extension.service.IService; | ||
|
||
/** | ||
* @author liuwe | ||
* @description 针对表【test】的数据库操作Service | ||
* @createDate 2024-08-21 19:20:09 | ||
*/ | ||
public interface TestService extends IService<Test> { | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
backend/move/src/main/java/generator/service/impl/TestServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package generator.service.impl; | ||
|
||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
import generator.com.example.move.Test; | ||
import generator.service.TestService; | ||
import generator.mapper.TestMapper; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** | ||
* @author liuwe | ||
* @description 针对表【test】的数据库操作Service实现 | ||
* @createDate 2024-08-21 19:20:09 | ||
*/ | ||
@Service | ||
public class TestServiceImpl extends ServiceImpl<TestMapper, Test> | ||
implements TestService{ | ||
|
||
} | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
spring.application.name=move | ||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver | ||
spring.datasource.url=jdbc:mysql://localhost:3306/zybanjia | ||
spring.datasource.username=root | ||
spring.datasource.password=123456 | ||
#spring.datasource.url=jdbc:mysql://localhost:3306/db01 | ||
#spring.datasource.url=jdbc:mysql://localhost:3306/zybanjia | ||
#spring.datasource.username=root | ||
#spring.datasource.password=1234 | ||
#spring.datasource.password=123456 | ||
spring.datasource.url=jdbc:mysql://localhost:3306/db01 | ||
spring.datasource.username=root | ||
spring.datasource.password=liuweijie | ||
# application.properties | ||
mybatis.mapper-locations=classpath:mapper/*.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE mapper | ||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
<mapper namespace="com.example.move.mapper.StaffMapper"> | ||
|
||
<resultMap id="BaseResultMap" type="com.example.move.pojo.Staff"> | ||
<id property="staffId" column="staff_id" jdbcType="INTEGER"/> | ||
<result property="staffType" column="staff_type" jdbcType="VARCHAR"/> | ||
<result property="staffName" column="staff_name" jdbcType="VARCHAR"/> | ||
<result property="staffIdNo" column="staff_id_no" jdbcType="VARCHAR"/> | ||
<result property="staffPhoneNo" column="staff_phone-no" jdbcType="VARCHAR"/> | ||
<result property="staffWechatNo" column="staff_wechat_no" jdbcType="VARCHAR"/> | ||
<result property="staffPos" column="staff_pos" jdbcType="VARCHAR"/> | ||
<result property="staffStatus" column="staff_status" jdbcType="VARCHAR"/> | ||
</resultMap> | ||
|
||
<sql id="Base_Column_List"> | ||
staff_id,staff_type,staff_name, | ||
staff_id_no,staff_phone-no,staff_wechat_no, | ||
staff_pos,staff_status | ||
</sql> | ||
<select id="staffNameByStaffid" resultMap="BaseResultMap"> | ||
select * from staff where staff_id = #{staffid} | ||
</select> | ||
</mapper> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ App({ | |
}) | ||
}, | ||
globalData: { | ||
userInfo: null | ||
userInfo: null, | ||
api:"http://localhost:8080" | ||
} | ||
}) |
Oops, something went wrong.