平台账号表对应类

master
yuqin 3 years ago
parent 9a2e940430
commit 7701d5c69d
  1. 7
      pom.xml
  2. 20
      src/main/java/com/yipin/liuwanr/controller/HrUserAccountController.java
  3. 81
      src/main/java/com/yipin/liuwanr/entity/HrUserAccount.java
  4. 16
      src/main/java/com/yipin/liuwanr/mapper/HrUserAccountMapper.java
  5. 16
      src/main/java/com/yipin/liuwanr/service/IHrUserAccountService.java
  6. 20
      src/main/java/com/yipin/liuwanr/service/impl/HrUserAccountServiceImpl.java
  7. 8
      src/main/java/com/yipin/liuwanr/util/MyBatisPlusCodeGenerator.java
  8. 20
      src/main/resources/mapper/tms/HrUserAccountMapper.xml

@ -289,6 +289,13 @@
</exclusion>
</exclusions>
</dependency>
<!-- MP 核心库 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.0.7.1</version>
</dependency>
</dependencies>
<build>
<finalName>root</finalName>

@ -0,0 +1,20 @@
package com.yipin.liuwanr.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
/**
* <p>
* 各个平台账号表 前端控制器
* </p>
*
* @author Qyq
* @since 2021-06-18
*/
@Controller
@RequestMapping("/hr-user-account")
public class HrUserAccountController {
}

@ -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;
/**
* <p>
* 各个平台账号表
* </p>
*
* @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;
}

@ -0,0 +1,16 @@
package com.yipin.liuwanr.mapper;
import com.yipin.liuwanr.entity.HrUserAccount;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 各个平台账号表 Mapper 接口
* </p>
*
* @author Qyq
* @since 2021-06-18
*/
public interface HrUserAccountMapper extends BaseMapper<HrUserAccount> {
}

@ -0,0 +1,16 @@
package com.yipin.liuwanr.service;
import com.yipin.liuwanr.entity.HrUserAccount;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 各个平台账号表 服务类
* </p>
*
* @author Qyq
* @since 2021-06-18
*/
public interface IHrUserAccountService extends IService<HrUserAccount> {
}

@ -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;
/**
* <p>
* 各个平台账号表 服务实现类
* </p>
*
* @author Qyq
* @since 2021-06-18
*/
@Service
public class HrUserAccountServiceImpl extends ServiceImpl<HrUserAccountMapper, HrUserAccount> implements IHrUserAccountService {
}

@ -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);
// 包配置

@ -0,0 +1,20 @@
<?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.yipin.liuwanr.mapper.HrUserAccountMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.yipin.liuwanr.entity.HrUserAccount">
<id column="id" property="id" />
<result column="user_id" property="userId" />
<result column="account" property="account" />
<result column="password" property="password" />
<result column="work_number" property="workNumber" />
<result column="role_id" property="roleId" />
<result column="school_id" property="schoolId" />
<result column="platform_id" property="platformId" />
<result column="type" property="type" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap>
</mapper>
Loading…
Cancel
Save