@@ -26,14 +26,9 @@ | |||
<artifactId>freemarker</artifactId> | |||
</dependency> | |||
<!--Mysql数据库驱动--> | |||
<!--<dependency> | |||
<dependency> | |||
<groupId>mysql</groupId> | |||
<artifactId>mysql-connector-java</artifactId> | |||
</dependency>--> | |||
<!--postgresql 数据库驱动--> | |||
<dependency> | |||
<groupId>org.postgresql</groupId> | |||
<artifactId>postgresql</artifactId> | |||
</dependency> | |||
</dependencies> | |||
</project> |
@@ -13,13 +13,13 @@ import java.util.Collections; | |||
*/ | |||
public class GeneratorCodeConfig { | |||
private static final String PATH_LXX = ""; | |||
private static final String PATH_LXX = "/Users/liuxinxin/IdeaProjects/project-management/pmapi/src/main/java"; | |||
private static final String PATH_YYD = ""; | |||
private static final String PATH_LS = ""; | |||
private static final String PATH_ZPF = ""; | |||
private static final String PATH_CMM = ""; | |||
private static final String URL = "jdbc:mysql://47.98.125.47:3306/car_rental?" + | |||
private static final String URL = "jdbc:mysql://47.98.125.47:3306/nd_project_management?" + | |||
"useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&" + | |||
"useSSL=false&serverTimezone=Asia/Shanghai"; | |||
private static final String USER_NAME = "root"; | |||
@@ -58,7 +58,7 @@ public class GeneratorCodeConfig { | |||
} | |||
public static void main(String[] args) { | |||
generate("Liuxinxin", "null", PATH_LXX, "null"); | |||
generate("Liuxinxin", "user", PATH_LXX, "nd_user_auth", "nd_user_info"); | |||
} | |||
} |
@@ -14,4 +14,5 @@ public enum AppErrorCode { | |||
public Integer getCode() { | |||
return code; | |||
} | |||
} |
@@ -0,0 +1,20 @@ | |||
package com.ningdatech.pmapi.user.controller; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.stereotype.Controller; | |||
/** | |||
* <p> | |||
* 用户鉴权表 前端控制器 | |||
* </p> | |||
* | |||
* @author Liuxinxin | |||
* @since 2023-01-04 | |||
*/ | |||
@Controller | |||
@RequestMapping("/pmapi.user/user-auth") | |||
public class UserAuthController { | |||
} |
@@ -0,0 +1,20 @@ | |||
package com.ningdatech.pmapi.user.controller; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.stereotype.Controller; | |||
/** | |||
* <p> | |||
* 用户信息表 前端控制器 | |||
* </p> | |||
* | |||
* @author Liuxinxin | |||
* @since 2023-01-04 | |||
*/ | |||
@Controller | |||
@RequestMapping("/pmapi.user/user-info") | |||
public class UserInfoController { | |||
} |
@@ -0,0 +1,102 @@ | |||
package com.ningdatech.pmapi.user.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import java.io.Serializable; | |||
import java.time.LocalDateTime; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
/** | |||
* <p> | |||
* 用户鉴权表 | |||
* </p> | |||
* | |||
* @author Liuxinxin | |||
* @since 2023-01-04 | |||
*/ | |||
@TableName("nd_user_auth") | |||
@ApiModel(value = "UserAuth对象", description = "用户鉴权表") | |||
public class UserAuth implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@TableId(value = "id", type = IdType.AUTO) | |||
private Long id; | |||
private LocalDateTime createOn; | |||
private LocalDateTime updateOn; | |||
private Long userId; | |||
private String authType; | |||
private String identifier; | |||
private String credential; | |||
public Long getId() { | |||
return id; | |||
} | |||
public void setId(Long id) { | |||
this.id = id; | |||
} | |||
public LocalDateTime getCreateOn() { | |||
return createOn; | |||
} | |||
public void setCreateOn(LocalDateTime createOn) { | |||
this.createOn = createOn; | |||
} | |||
public LocalDateTime getUpdateOn() { | |||
return updateOn; | |||
} | |||
public void setUpdateOn(LocalDateTime updateOn) { | |||
this.updateOn = updateOn; | |||
} | |||
public Long getUserId() { | |||
return userId; | |||
} | |||
public void setUserId(Long userId) { | |||
this.userId = userId; | |||
} | |||
public String getAuthType() { | |||
return authType; | |||
} | |||
public void setAuthType(String authType) { | |||
this.authType = authType; | |||
} | |||
public String getIdentifier() { | |||
return identifier; | |||
} | |||
public void setIdentifier(String identifier) { | |||
this.identifier = identifier; | |||
} | |||
public String getCredential() { | |||
return credential; | |||
} | |||
public void setCredential(String credential) { | |||
this.credential = credential; | |||
} | |||
@Override | |||
public String toString() { | |||
return "UserAuth{" + | |||
"id=" + id + | |||
", createOn=" + createOn + | |||
", updateOn=" + updateOn + | |||
", userId=" + userId + | |||
", authType=" + authType + | |||
", identifier=" + identifier + | |||
", credential=" + credential + | |||
"}"; | |||
} | |||
} |
@@ -0,0 +1,208 @@ | |||
package com.ningdatech.pmapi.user.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import java.io.Serializable; | |||
import java.time.LocalDateTime; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
/** | |||
* <p> | |||
* 用户信息表 | |||
* </p> | |||
* | |||
* @author Liuxinxin | |||
* @since 2023-01-04 | |||
*/ | |||
@TableName("nd_user_info") | |||
@ApiModel(value = "UserInfo对象", description = "用户信息表") | |||
public class UserInfo implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@ApiModelProperty("主键") | |||
@TableId(value = "id", type = IdType.AUTO) | |||
private Long id; | |||
@ApiModelProperty("创建时间") | |||
private LocalDateTime createOn; | |||
@ApiModelProperty("最后修改时间") | |||
private LocalDateTime updateOn; | |||
@ApiModelProperty("创建人") | |||
private Long createBy; | |||
@ApiModelProperty("最后修改人") | |||
private Long updateBy; | |||
@ApiModelProperty("用户名(登陆账号)") | |||
private String username; | |||
@ApiModelProperty("手机") | |||
private String mobile; | |||
@ApiModelProperty("用户真实姓名") | |||
private String realName; | |||
@ApiModelProperty("所属公司id") | |||
private Long companyId; | |||
@ApiModelProperty("所属公司名称") | |||
private String companyName; | |||
@ApiModelProperty("用户角色") | |||
private String role; | |||
@ApiModelProperty("区域id") | |||
private Long regionCode; | |||
@ApiModelProperty("头像文件id") | |||
private Long avatarFileId; | |||
@ApiModelProperty("所负责的公司id列表") | |||
private String manageCompanyIds; | |||
@ApiModelProperty("是否删除") | |||
private Boolean deleted; | |||
@ApiModelProperty("身份证号") | |||
private String idCard; | |||
public Long getId() { | |||
return id; | |||
} | |||
public void setId(Long id) { | |||
this.id = id; | |||
} | |||
public LocalDateTime getCreateOn() { | |||
return createOn; | |||
} | |||
public void setCreateOn(LocalDateTime createOn) { | |||
this.createOn = createOn; | |||
} | |||
public LocalDateTime getUpdateOn() { | |||
return updateOn; | |||
} | |||
public void setUpdateOn(LocalDateTime updateOn) { | |||
this.updateOn = updateOn; | |||
} | |||
public Long getCreateBy() { | |||
return createBy; | |||
} | |||
public void setCreateBy(Long createBy) { | |||
this.createBy = createBy; | |||
} | |||
public Long getUpdateBy() { | |||
return updateBy; | |||
} | |||
public void setUpdateBy(Long updateBy) { | |||
this.updateBy = updateBy; | |||
} | |||
public String getUsername() { | |||
return username; | |||
} | |||
public void setUsername(String username) { | |||
this.username = username; | |||
} | |||
public String getMobile() { | |||
return mobile; | |||
} | |||
public void setMobile(String mobile) { | |||
this.mobile = mobile; | |||
} | |||
public String getRealName() { | |||
return realName; | |||
} | |||
public void setRealName(String realName) { | |||
this.realName = realName; | |||
} | |||
public Long getCompanyId() { | |||
return companyId; | |||
} | |||
public void setCompanyId(Long companyId) { | |||
this.companyId = companyId; | |||
} | |||
public String getCompanyName() { | |||
return companyName; | |||
} | |||
public void setCompanyName(String companyName) { | |||
this.companyName = companyName; | |||
} | |||
public String getRole() { | |||
return role; | |||
} | |||
public void setRole(String role) { | |||
this.role = role; | |||
} | |||
public Long getRegionCode() { | |||
return regionCode; | |||
} | |||
public void setRegionCode(Long regionCode) { | |||
this.regionCode = regionCode; | |||
} | |||
public Long getAvatarFileId() { | |||
return avatarFileId; | |||
} | |||
public void setAvatarFileId(Long avatarFileId) { | |||
this.avatarFileId = avatarFileId; | |||
} | |||
public String getManageCompanyIds() { | |||
return manageCompanyIds; | |||
} | |||
public void setManageCompanyIds(String manageCompanyIds) { | |||
this.manageCompanyIds = manageCompanyIds; | |||
} | |||
public Boolean getDeleted() { | |||
return deleted; | |||
} | |||
public void setDeleted(Boolean deleted) { | |||
this.deleted = deleted; | |||
} | |||
public String getIdCard() { | |||
return idCard; | |||
} | |||
public void setIdCard(String idCard) { | |||
this.idCard = idCard; | |||
} | |||
@Override | |||
public String toString() { | |||
return "UserInfo{" + | |||
"id=" + id + | |||
", createOn=" + createOn + | |||
", updateOn=" + updateOn + | |||
", createBy=" + createBy + | |||
", updateBy=" + updateBy + | |||
", username=" + username + | |||
", mobile=" + mobile + | |||
", realName=" + realName + | |||
", companyId=" + companyId + | |||
", companyName=" + companyName + | |||
", role=" + role + | |||
", regionCode=" + regionCode + | |||
", avatarFileId=" + avatarFileId + | |||
", manageCompanyIds=" + manageCompanyIds + | |||
", deleted=" + deleted + | |||
", idCard=" + idCard + | |||
"}"; | |||
} | |||
} |
@@ -0,0 +1,16 @@ | |||
package com.ningdatech.pmapi.user.mapper; | |||
import com.ningdatech.pmapi.user.entity.UserAuth; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
/** | |||
* <p> | |||
* 用户鉴权表 Mapper 接口 | |||
* </p> | |||
* | |||
* @author Liuxinxin | |||
* @since 2023-01-04 | |||
*/ | |||
public interface UserAuthMapper extends BaseMapper<UserAuth> { | |||
} |
@@ -0,0 +1,5 @@ | |||
<?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.ningdatech.pmapi.user.mapper.UserAuthMapper"> | |||
</mapper> |
@@ -0,0 +1,16 @@ | |||
package com.ningdatech.pmapi.user.mapper; | |||
import com.ningdatech.pmapi.user.entity.UserInfo; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
/** | |||
* <p> | |||
* 用户信息表 Mapper 接口 | |||
* </p> | |||
* | |||
* @author Liuxinxin | |||
* @since 2023-01-04 | |||
*/ | |||
public interface UserInfoMapper extends BaseMapper<UserInfo> { | |||
} |
@@ -0,0 +1,5 @@ | |||
<?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.ningdatech.pmapi.user.mapper.UserInfoMapper"> | |||
</mapper> |
@@ -0,0 +1,16 @@ | |||
package com.ningdatech.pmapi.user.service; | |||
import com.ningdatech.pmapi.user.entity.UserAuth; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
/** | |||
* <p> | |||
* 用户鉴权表 服务类 | |||
* </p> | |||
* | |||
* @author Liuxinxin | |||
* @since 2023-01-04 | |||
*/ | |||
public interface IUserAuthService extends IService<UserAuth> { | |||
} |
@@ -0,0 +1,16 @@ | |||
package com.ningdatech.pmapi.user.service; | |||
import com.ningdatech.pmapi.user.entity.UserInfo; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
/** | |||
* <p> | |||
* 用户信息表 服务类 | |||
* </p> | |||
* | |||
* @author Liuxinxin | |||
* @since 2023-01-04 | |||
*/ | |||
public interface IUserInfoService extends IService<UserInfo> { | |||
} |
@@ -0,0 +1,20 @@ | |||
package com.ningdatech.pmapi.user.service.impl; | |||
import com.ningdatech.pmapi.user.entity.UserAuth; | |||
import com.ningdatech.pmapi.user.mapper.UserAuthMapper; | |||
import com.ningdatech.pmapi.user.service.IUserAuthService; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* <p> | |||
* 用户鉴权表 服务实现类 | |||
* </p> | |||
* | |||
* @author Liuxinxin | |||
* @since 2023-01-04 | |||
*/ | |||
@Service | |||
public class UserAuthServiceImpl extends ServiceImpl<UserAuthMapper, UserAuth> implements IUserAuthService { | |||
} |
@@ -0,0 +1,20 @@ | |||
package com.ningdatech.pmapi.user.service.impl; | |||
import com.ningdatech.pmapi.user.entity.UserInfo; | |||
import com.ningdatech.pmapi.user.mapper.UserInfoMapper; | |||
import com.ningdatech.pmapi.user.service.IUserInfoService; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import org.springframework.stereotype.Service; | |||
/** | |||
* <p> | |||
* 用户信息表 服务实现类 | |||
* </p> | |||
* | |||
* @author Liuxinxin | |||
* @since 2023-01-04 | |||
*/ | |||
@Service | |||
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements IUserInfoService { | |||
} |