diff --git a/pom.xml b/pom.xml index c363b3c..01a5255 100644 --- a/pom.xml +++ b/pom.xml @@ -289,6 +289,13 @@ + + + + com.baomidou + mybatis-plus-boot-starter + 3.0.7.1 + root diff --git a/src/main/java/com/yipin/liuwanr/controller/HrUserAccountController.java b/src/main/java/com/yipin/liuwanr/controller/HrUserAccountController.java new file mode 100644 index 0000000..82b0eb3 --- /dev/null +++ b/src/main/java/com/yipin/liuwanr/controller/HrUserAccountController.java @@ -0,0 +1,20 @@ +package com.yipin.liuwanr.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.stereotype.Controller; + +/** + *

+ * 各个平台账号表 前端控制器 + *

+ * + * @author Qyq + * @since 2021-06-18 + */ +@Controller +@RequestMapping("/hr-user-account") +public class HrUserAccountController { + +} diff --git a/src/main/java/com/yipin/liuwanr/entity/HrUserAccount.java b/src/main/java/com/yipin/liuwanr/entity/HrUserAccount.java new file mode 100644 index 0000000..cc1352c --- /dev/null +++ b/src/main/java/com/yipin/liuwanr/entity/HrUserAccount.java @@ -0,0 +1,81 @@ +package com.yipin.liuwanr.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +import java.io.Serializable; + +/** + *

+ * 各个平台账号表 + *

+ * + * @author Qyq + * @since 2021-06-18 + */ +@Data +@TableName("hr_user_account") +public class HrUserAccount implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @TableId(value = "id", type = IdType.ID_WORKER) + private Integer id; + + /** + * 用户表id + */ + private Integer userId; + + /** + * 账号 + */ + private String account; + + /** + * 密码 + */ + private String password; + + /** + * 工号 + */ + private String workNumber; + + /** + * 绑定的角色id + */ + private String roleId; + + /** + * 绑定院校id + */ + private Integer schoolId; + + /** + * 所属平台:1->职站 2->数据平台 + */ + private Integer platformId; + + /** + * 平台端区分:0->教师端 1->学生端 + */ + private Integer type; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + +} diff --git a/src/main/java/com/yipin/liuwanr/mapper/HrUserAccountMapper.java b/src/main/java/com/yipin/liuwanr/mapper/HrUserAccountMapper.java new file mode 100644 index 0000000..1bd6ade --- /dev/null +++ b/src/main/java/com/yipin/liuwanr/mapper/HrUserAccountMapper.java @@ -0,0 +1,16 @@ +package com.yipin.liuwanr.mapper; + +import com.yipin.liuwanr.entity.HrUserAccount; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 各个平台账号表 Mapper 接口 + *

+ * + * @author Qyq + * @since 2021-06-18 + */ +public interface HrUserAccountMapper extends BaseMapper { + +} diff --git a/src/main/java/com/yipin/liuwanr/service/IHrUserAccountService.java b/src/main/java/com/yipin/liuwanr/service/IHrUserAccountService.java new file mode 100644 index 0000000..e931e97 --- /dev/null +++ b/src/main/java/com/yipin/liuwanr/service/IHrUserAccountService.java @@ -0,0 +1,16 @@ +package com.yipin.liuwanr.service; + +import com.yipin.liuwanr.entity.HrUserAccount; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 各个平台账号表 服务类 + *

+ * + * @author Qyq + * @since 2021-06-18 + */ +public interface IHrUserAccountService extends IService { + +} diff --git a/src/main/java/com/yipin/liuwanr/service/impl/HrUserAccountServiceImpl.java b/src/main/java/com/yipin/liuwanr/service/impl/HrUserAccountServiceImpl.java new file mode 100644 index 0000000..b0c6f4a --- /dev/null +++ b/src/main/java/com/yipin/liuwanr/service/impl/HrUserAccountServiceImpl.java @@ -0,0 +1,20 @@ +package com.yipin.liuwanr.service.impl; + +import com.yipin.liuwanr.entity.HrUserAccount; +import com.yipin.liuwanr.mapper.HrUserAccountMapper; +import com.yipin.liuwanr.service.IHrUserAccountService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 各个平台账号表 服务实现类 + *

+ * + * @author Qyq + * @since 2021-06-18 + */ +@Service +public class HrUserAccountServiceImpl extends ServiceImpl implements IHrUserAccountService { + +} diff --git a/src/main/java/com/yipin/liuwanr/util/MyBatisPlusCodeGenerator.java b/src/main/java/com/yipin/liuwanr/util/MyBatisPlusCodeGenerator.java index 0bd7ed3..e2d0b9e 100644 --- a/src/main/java/com/yipin/liuwanr/util/MyBatisPlusCodeGenerator.java +++ b/src/main/java/com/yipin/liuwanr/util/MyBatisPlusCodeGenerator.java @@ -25,7 +25,7 @@ public class MyBatisPlusCodeGenerator { public static final String PACKAGE_NAME = "com.yipin.liuwanr"; public static void main(String[] args) { - String[] tables = new String[] {"sys_permission","sys_role","sys_role_permission","sys_user_role"};//表名数组 + String[] tables = new String[] {"hr_user_account"};//表名数组 String[] tablePrefixs = new String[] {""};//去掉前缀 executeCode(PACKAGE_NAME,tables,tablePrefixs); } @@ -58,10 +58,10 @@ public class MyBatisPlusCodeGenerator { // 数据源配置 DataSourceConfig config= new DataSourceConfig(); // 从试图获取 - config.setUrl("jdbc:mysql://localhost:3306/msdw_tms?serverTimezone=UTC"); + config.setUrl("jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3306/zt_huoran?serverTimezone=UTC"); config.setDriverName("com.mysql.cj.jdbc.Driver"); - config.setUsername("root"); - config.setPassword("root"); + config.setUsername("super"); + config.setPassword("huoran888"); mpg.setDataSource(config); // 包配置 diff --git a/src/main/resources/mapper/tms/HrUserAccountMapper.xml b/src/main/resources/mapper/tms/HrUserAccountMapper.xml new file mode 100644 index 0000000..edd1939 --- /dev/null +++ b/src/main/resources/mapper/tms/HrUserAccountMapper.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + +