初始化
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package com.njcn.user.pojo.constant;
|
||||
|
||||
/**
|
||||
* @author 徐扬
|
||||
*/
|
||||
public interface ComponentState {
|
||||
|
||||
/**
|
||||
* 状态 0-删除;1-正常;默认正常
|
||||
*/
|
||||
int DELETE = 0;
|
||||
|
||||
int ENABLE = 1;
|
||||
|
||||
/**
|
||||
* 顶层父类的pid
|
||||
*/
|
||||
String FATHER_PID = "0";
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.njcn.user.pojo.constant;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2021/12/28
|
||||
*
|
||||
*/
|
||||
public interface DeptState {
|
||||
|
||||
/**
|
||||
* 部门状态 0-删除;1-正常;默认正常
|
||||
*/
|
||||
int DELETE = 0;
|
||||
int ENABLE = 1;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.user.pojo.constant;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2021/12/28
|
||||
*
|
||||
*/
|
||||
public interface DeptType {
|
||||
|
||||
/**
|
||||
* 部门类型 0-非自定义;1-web自定义;2-App自定义
|
||||
*/
|
||||
int UNCUSTOM = 0;
|
||||
int WEBCUSTOM = 1;
|
||||
int APPCUSTOM = 2;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.njcn.user.pojo.constant;
|
||||
|
||||
/**
|
||||
* @author 徐扬
|
||||
*/
|
||||
public interface FunctionState {
|
||||
|
||||
/**
|
||||
* 权限资源状态 0-删除;1-正常;默认正常
|
||||
*/
|
||||
int DELETE = 0;
|
||||
|
||||
int ENABLE = 1;
|
||||
|
||||
/**
|
||||
* 顶层父类的pid
|
||||
*/
|
||||
String FATHER_PID = "0";
|
||||
|
||||
/**
|
||||
* 驾驶舱父类名称
|
||||
*/
|
||||
String DRIVER_NAME = "/home";
|
||||
|
||||
/**
|
||||
* 权限资源类型 0-菜单、1-按钮、2-公共资源、3-服务间调用资源
|
||||
*/
|
||||
int MENU = 0;
|
||||
|
||||
int BUTTON = 1;
|
||||
|
||||
int PUBLIC = 2;
|
||||
|
||||
int IN_SERVICE = 3;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.njcn.user.pojo.constant;
|
||||
|
||||
/**
|
||||
* @author 徐扬
|
||||
*/
|
||||
public interface HomePageState {
|
||||
|
||||
/**
|
||||
* 状态 0-删除;1-正常;默认正常
|
||||
*/
|
||||
int DELETE = 0;
|
||||
|
||||
int ENABLE = 1;
|
||||
|
||||
/**
|
||||
* 默认首页 用户的id
|
||||
*/
|
||||
String DEFAULT_USER_ID = "0";
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.njcn.user.pojo.constant;
|
||||
|
||||
/**
|
||||
* @author 徐扬
|
||||
*/
|
||||
public interface RoleType {
|
||||
|
||||
/**
|
||||
* 角色类型 0:超级管理员;1:管理员;2:用户
|
||||
*/
|
||||
int SUPER_ADMINISTRATOR = 0;
|
||||
|
||||
int ADMINISTRATOR = 1;
|
||||
|
||||
int USER = 2;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.njcn.user.pojo.constant;
|
||||
|
||||
/**
|
||||
* @author 徐扬
|
||||
*/
|
||||
public interface UserDefaultPassword {
|
||||
|
||||
/**
|
||||
* 新增用户初始密码
|
||||
*/
|
||||
String DEFAULT_PASSWORD = "123456";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.njcn.user.pojo.constant;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2021年12月15日 15:00
|
||||
*/
|
||||
public interface UserState {
|
||||
|
||||
/**
|
||||
* 用户状态 0:删除;1:正常;2:锁定;3:待审核;4:休眠;5:密码过期
|
||||
*/
|
||||
int DELETE = 0;
|
||||
int ENABLE = 1;
|
||||
int LOCKED = 2;
|
||||
int UNCHECK = 3;
|
||||
int SLEEP = 4;
|
||||
int OVERDUE = 5;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 数据来源:0-外部推送 1-正常新增
|
||||
*/
|
||||
int OUT_ORIGIN = 0;
|
||||
int NORMAL_ORIGIN = 1;
|
||||
|
||||
|
||||
/**
|
||||
* 密码状态:0-不需要修改 1-需要修改
|
||||
*/
|
||||
int NEEDLESS = 0;
|
||||
int NEED = 1;
|
||||
|
||||
|
||||
/**
|
||||
* 初始密码错误次数
|
||||
*/
|
||||
int ERROR_PASSWORD_TIMES = 0;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.njcn.user.pojo.constant;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2021年12月15日 19:39
|
||||
*/
|
||||
public interface UserType {
|
||||
|
||||
/**
|
||||
* 用户类型 0:临时用户;1:正式用户
|
||||
*/
|
||||
int CASUAL = 0;
|
||||
|
||||
int OFFICIAL = 1;
|
||||
|
||||
/**
|
||||
* 用户权限类型 0:超级管理员;1:管理员;2:用户
|
||||
*/
|
||||
int SUPER_ADMINISTRATOR = 0;
|
||||
|
||||
int ADMINISTRATOR = 1;
|
||||
|
||||
int USER = 2;
|
||||
|
||||
String SUPER_ADMIN = "root";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.njcn.user.pojo.constant;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
* @date 2021/12/29 15:10
|
||||
*/
|
||||
public interface UserValidMessage {
|
||||
|
||||
String ID_NOT_BLANK = "id不能为空,请检查id参数";
|
||||
|
||||
String USERNAME_NOT_BLANK = "名称不能为空,请检查name参数";
|
||||
|
||||
String USERNAME_FORMAT_ERROR = "用户名格式错误,需中英文1-16,请检查name参数";
|
||||
|
||||
String LOGIN_NAME_NOT_BLANK = "登录名不能为空,请检查loginName参数";
|
||||
|
||||
String LOGIN_NAME_FORMAT_ERROR = "登录名格式错误,需3-16位的英文字母和数字,请检查loginName参数";
|
||||
|
||||
String PASSWORD_NOT_BLANK = "密码不能为空,请检查password参数";
|
||||
|
||||
String PASSWORD_FORMAT_ERROR = "密码格式错误,需包含特殊字符字母数字,长度为8-16,请检查password参数";
|
||||
|
||||
String DEPT_NOT_BLANK = "部门不能为空,请检查deptId参数";
|
||||
|
||||
String PHONE_FORMAT_ERROR = "电话号码格式错误,请检查phone参数";
|
||||
|
||||
String EMAIL_FORMAT_ERROR = "邮箱格式错误,请检查email参数";
|
||||
|
||||
String LIMIT_IP_START_NOT_BLANK = "起始IP不能为空,请检查limitIpStart参数";
|
||||
|
||||
String LIMIT_IP_START_FORMAT_ERROR = "起始IP格式错误,请检查limitIpStart参数";
|
||||
|
||||
String LIMIT_IP_END_NOT_BLANK = "结束IP不能为空,请检查limitIpEnd参数";
|
||||
|
||||
String LIMIT_IP_END_FORMAT_ERROR = "结束IP格式错误,请检查limitIpEnd参数";
|
||||
|
||||
String LIMIT_TIME_NOT_BLANK = "时间段不能为空,请检查limitTime参数";
|
||||
|
||||
String CASUAL_USER_NOT_BLANK = "类型不能为空";
|
||||
|
||||
String SMS_NOTICE_NOT_BLANK = "短信通知不能为空,请检查smsNotice参数";
|
||||
|
||||
String EMAIL_NOTICE_NOT_BLANK = "邮件通知不能为空,请检查emailNotice参数";
|
||||
|
||||
String PARAM_FORMAT_ERROR = "参数值非法";
|
||||
|
||||
String ROLE_NOT_BLANK = "角色不能为空,请检查role参数";
|
||||
|
||||
String PID_NOT_BLANK = "父节点不能为空,请检查pid参数";
|
||||
|
||||
String CODE_NOT_BLANK = "资源标识不能为空,请检查code参数";
|
||||
|
||||
String PATH_NOT_BLANK = "资源路径不能为空,请检查path参数";
|
||||
|
||||
String PATH_FORMAT_ERROR = "路径格式错误,请检查path参数";
|
||||
|
||||
String SORT_NOT_BLANK = "排序不能为空,请检查sort参数";
|
||||
|
||||
String TYPE_NOT_BLANK = "资源类型不能为空,请检查type参数";
|
||||
|
||||
String LAYOUT_NOT_BLANK = "模板不能为空,请检查layout参数";
|
||||
|
||||
String FUNCTION_ID_NOT_BLANK = "资源id不能为空,请检查functionId参数";
|
||||
|
||||
String FUNCTION_ID_FORMAT_ERROR = "资源id格式错误,请检查functionId参数";
|
||||
|
||||
String FUNCTION_GROUP_NOT_BLANK = "功能数组不能为空,请检查functionGroup参数";
|
||||
|
||||
String FUNCTION_GROUP_FORMAT_ERROR = "功能数组格式错误,请检查functionGroup参数";
|
||||
|
||||
String COMPONENT_CODE_NOT_BLANK = "功能组件表示不能为空,请检查code参数";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.njcn.user.pojo.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/1/19 14:56
|
||||
*/
|
||||
@Data
|
||||
public class ComponentDTO implements Serializable {
|
||||
|
||||
@ApiModelProperty("组件Id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("资源id")
|
||||
private String functionId;
|
||||
|
||||
@ApiModelProperty("节点")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty("功能组件名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("功能数组")
|
||||
private String functionGroup;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("功能组件表示")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("路径")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty("子级")
|
||||
List<ComponentDTO> children;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.njcn.user.pojo.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2022年02月11日 14:08
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DeptDTO implements Serializable {
|
||||
|
||||
private String id;
|
||||
|
||||
private String pid;
|
||||
|
||||
private String pids;
|
||||
|
||||
private String name;
|
||||
|
||||
private String area;
|
||||
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 部门类型 0-非自定义;1-web自定义;2-App自定义;3-web测试
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.njcn.user.pojo.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2021年05月08日 15:12
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserDTO {
|
||||
|
||||
private String userIndex;
|
||||
|
||||
private String username;
|
||||
|
||||
private String nickname;
|
||||
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 角色集合
|
||||
*/
|
||||
private List<String> roleName;
|
||||
|
||||
/**
|
||||
* sm4加密秘钥
|
||||
*/
|
||||
private String secretKey;
|
||||
|
||||
/**
|
||||
* sm4中间过程校验
|
||||
*/
|
||||
private String standBy;
|
||||
|
||||
private String deptIndex;
|
||||
|
||||
private Integer type;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.njcn.user.pojo.dto.excel;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2022年04月06日 16:13
|
||||
*/
|
||||
@Data
|
||||
public class UserExcel implements Serializable {
|
||||
|
||||
private String id;
|
||||
|
||||
@Excel(name = "用户名", width = 20)
|
||||
private String name;
|
||||
|
||||
@Excel(name = "登录名", width = 20)
|
||||
private String loginName;
|
||||
|
||||
@Excel(name = "角色", width = 20)
|
||||
private String role;
|
||||
|
||||
@Excel(name = "部门", width = 20)
|
||||
private String deptName;
|
||||
|
||||
@Excel(name = "手机", width = 20)
|
||||
private String phone;
|
||||
|
||||
@Excel(name = "注册时间", format = "yyyy-MM-dd HH:mm:ss", width = 20)
|
||||
private LocalDateTime registerTime;
|
||||
|
||||
@Excel(name = "最后登录时间", format = "yyyy-MM-dd HH:mm:ss", width = 20)
|
||||
private LocalDateTime loginTime;
|
||||
|
||||
@Excel(name = "用户类型", replace = {"临时用户_0", "正式用户_1"}, width = 20)
|
||||
private Integer casualUser;
|
||||
|
||||
@Excel(name = "状态", replace = {"注销_0", "正常_1", "锁定_2", "待审核_3", "休眠_4", "密码过期_5"}, width = 20)
|
||||
private Integer state;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.njcn.user.pojo.param;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.user.pojo.constant.UserValidMessage;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/1/19 9:16
|
||||
*/
|
||||
@Data
|
||||
public class ComponentParam {
|
||||
|
||||
@ApiModelProperty("资源id")
|
||||
@NotBlank(message = UserValidMessage.FUNCTION_ID_NOT_BLANK)
|
||||
private String functionId;
|
||||
|
||||
@ApiModelProperty("节点")
|
||||
@NotBlank(message = UserValidMessage.PID_NOT_BLANK)
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty("功能组件名称")
|
||||
@NotBlank(message = UserValidMessage.USERNAME_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.FUNCTION_NAME, message = UserValidMessage.PATH_FORMAT_ERROR)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("功能数组")
|
||||
@NotEmpty(message = UserValidMessage.FUNCTION_GROUP_NOT_BLANK)
|
||||
private List<Integer> functionGroup;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
@NotNull(message = UserValidMessage.SORT_NOT_BLANK)
|
||||
@Range(min = 0, max = 999, message = UserValidMessage.PARAM_FORMAT_ERROR)
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("功能组件表示")
|
||||
@NotBlank(message = UserValidMessage.COMPONENT_CODE_NOT_BLANK)
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("路径")
|
||||
private String path;
|
||||
|
||||
|
||||
/**
|
||||
* 组件更新操作实体
|
||||
* 需要填写的参数:组件的id
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class ComponentUpdateParam extends ComponentParam {
|
||||
|
||||
@ApiModelProperty("组件Id")
|
||||
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.njcn.user.pojo.param;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2021/12/28 14:39
|
||||
* 部门
|
||||
*/
|
||||
@Data
|
||||
public class DeptParam {
|
||||
|
||||
@ApiModelProperty("父节点")
|
||||
@NotBlank(message = ValidMessage.PID_NOT_BLANK)
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty("行政区域id")
|
||||
@NotBlank(message = ValidMessage.AREA_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEMS_ID, message = ValidMessage.AREA_FORMAT_ERROR)
|
||||
private String area;
|
||||
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
@NotBlank(message = ValidMessage.NAME_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.DEPT_NAME_REGEX, message = ValidMessage.NAME_FORMAT_ERROR)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
@NotNull(message = ValidMessage.SORT_NOT_NULL)
|
||||
@Min(value = 0, message = ValidMessage.SORT_FORMAT_ERROR)
|
||||
@Max(value = 999, message = ValidMessage.SORT_FORMAT_ERROR)
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("部门类型 0-非自定义;1-web自定义;2-App自定义")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("描述")
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 更新操作实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class DeptUpdateParam extends DeptParam {
|
||||
|
||||
/**
|
||||
* 表Id
|
||||
*/
|
||||
@ApiModelProperty("id")
|
||||
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class QueryParam extends BaseParam {
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.njcn.user.pojo.param;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.user.pojo.constant.UserValidMessage;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/1/17 10:25
|
||||
*/
|
||||
@Data
|
||||
public class FunctionParam {
|
||||
|
||||
@ApiModelProperty("节点")
|
||||
@NotBlank(message = UserValidMessage.PID_NOT_BLANK)
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
@NotBlank(message = UserValidMessage.USERNAME_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.FUNCTION_NAME, message = ValidMessage.NAME_FORMAT_ERROR)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("资源标识")
|
||||
@NotBlank(message = UserValidMessage.CODE_NOT_BLANK)
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("路径")
|
||||
@NotBlank(message = UserValidMessage.PATH_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.FUNCTION_URL, message = UserValidMessage.PATH_FORMAT_ERROR)
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty("图标")
|
||||
private String icon;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
@NotNull(message = UserValidMessage.SORT_NOT_BLANK)
|
||||
@Range(min = 0, max = 999, message = UserValidMessage.PARAM_FORMAT_ERROR)
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("资源类型")
|
||||
@NotNull(message = UserValidMessage.TYPE_NOT_BLANK)
|
||||
@Range(min = 0, max = 3, message = UserValidMessage.PARAM_FORMAT_ERROR)
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("描述")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 资源更新操作实体
|
||||
* 需要填写的参数:资源的id
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class FunctionUpdateParam extends FunctionParam {
|
||||
|
||||
@ApiModelProperty("资源Id")
|
||||
@NotBlank(message = UserValidMessage.FUNCTION_ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = UserValidMessage.FUNCTION_ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.njcn.user.pojo.param;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.user.pojo.constant.UserValidMessage;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/1/18 16:14
|
||||
*/
|
||||
@Data
|
||||
public class HomePageParam {
|
||||
|
||||
@ApiModelProperty("自定义页面名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("布局模板")
|
||||
@NotBlank(message = UserValidMessage.LAYOUT_NOT_BLANK)
|
||||
private String layout;
|
||||
|
||||
@ApiModelProperty("路径")
|
||||
@NotBlank(message = UserValidMessage.PATH_NOT_BLANK)
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
@NotNull(message = UserValidMessage.SORT_NOT_BLANK)
|
||||
@Range(min = 0, max = 999, message = UserValidMessage.PARAM_FORMAT_ERROR)
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("图标")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 首页操作实体
|
||||
* 需要填写的参数:首页的id
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class HomePageUpdateParam extends HomePageParam {
|
||||
|
||||
@ApiModelProperty("首页Id")
|
||||
@NotBlank(message = UserValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.njcn.user.pojo.param;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2022/01/17 14:39
|
||||
* 角色
|
||||
*/
|
||||
@Data
|
||||
public class RoleParam {
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
@NotBlank(message = ValidMessage.NAME_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.DEPT_NAME_REGEX, message = ValidMessage.NAME_FORMAT_ERROR)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("角色代码")
|
||||
@NotNull(message = ValidMessage.CODE_NOT_BLANK)
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 角色类型 0:超级管理员;1:管理员;2:普通用户
|
||||
*/
|
||||
@ApiModelProperty("角色类型")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("角色描述")
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 更新操作实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class RoleUpdateParam extends RoleParam {
|
||||
|
||||
/**
|
||||
* 表Id
|
||||
*/
|
||||
@ApiModelProperty("id")
|
||||
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class QueryParam extends BaseParam {
|
||||
|
||||
/**
|
||||
* 权限类型
|
||||
*/
|
||||
private Integer type;
|
||||
}
|
||||
/**
|
||||
* 角色的相关关联
|
||||
*/
|
||||
@Data
|
||||
public static class RoleFunctionComponent {
|
||||
private String id;
|
||||
private List<String> idList;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.njcn.user.pojo.param;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.user.pojo.constant.UserValidMessage;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import com.njcn.web.pojo.param.BaseParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2021/12/29 14:56
|
||||
*/
|
||||
@Data
|
||||
public class UserParam {
|
||||
|
||||
@ApiModelProperty("用户名")
|
||||
@NotBlank(message = UserValidMessage.USERNAME_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.USERNAME_REGEX, message = UserValidMessage.USERNAME_FORMAT_ERROR)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("部门id")
|
||||
private String deptId;
|
||||
|
||||
@ApiModelProperty("电话号码")
|
||||
@Pattern(regexp = PatternRegex.PHONE_REGEX_OR_NULL, message = UserValidMessage.PHONE_FORMAT_ERROR)
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("邮箱")
|
||||
@Pattern(regexp = PatternRegex.EMAIL_REGEX_OR_NULL, message = UserValidMessage.EMAIL_FORMAT_ERROR)
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty("起始IP")
|
||||
@NotBlank(message = UserValidMessage.LIMIT_IP_START_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.IP_REGEX, message = UserValidMessage.LIMIT_IP_START_FORMAT_ERROR)
|
||||
private String limitIpStart;
|
||||
|
||||
@ApiModelProperty("结束IP")
|
||||
@NotBlank(message = UserValidMessage.LIMIT_IP_END_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.IP_REGEX, message = UserValidMessage.LIMIT_IP_END_FORMAT_ERROR)
|
||||
private String limitIpEnd;
|
||||
|
||||
@ApiModelProperty("时间段")
|
||||
@NotBlank(message = UserValidMessage.LIMIT_TIME_NOT_BLANK)
|
||||
private String limitTime;
|
||||
|
||||
@ApiModelProperty("用户类型")
|
||||
@NotNull(message = UserValidMessage.CASUAL_USER_NOT_BLANK)
|
||||
@Range(min = 0, max = 1, message = UserValidMessage.PARAM_FORMAT_ERROR)
|
||||
private Integer casualUser;
|
||||
|
||||
@ApiModelProperty("用户权限类型")
|
||||
@NotNull(message = UserValidMessage.CASUAL_USER_NOT_BLANK)
|
||||
@Range(min = 0, max = 2, message = UserValidMessage.PARAM_FORMAT_ERROR)
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("短信通知")
|
||||
@NotNull(message = UserValidMessage.SMS_NOTICE_NOT_BLANK)
|
||||
@Range(min = 0, max = 1, message = UserValidMessage.PARAM_FORMAT_ERROR)
|
||||
private Integer smsNotice;
|
||||
|
||||
@ApiModelProperty("邮件通知")
|
||||
@NotNull(message = UserValidMessage.EMAIL_NOTICE_NOT_BLANK)
|
||||
@Range(min = 0, max = 1, message = UserValidMessage.PARAM_FORMAT_ERROR)
|
||||
private Integer emailNotice;
|
||||
|
||||
@ApiModelProperty("角色")
|
||||
@NotEmpty(message = UserValidMessage.ROLE_NOT_BLANK)
|
||||
private List<String> role;
|
||||
|
||||
/**
|
||||
* 用户新增操作实体
|
||||
*
|
||||
* 需要填写的参数:登录名、密码
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class UserAddParam extends UserParam {
|
||||
|
||||
@ApiModelProperty("登录名")
|
||||
@NotBlank(message = UserValidMessage.LOGIN_NAME_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.LOGIN_NAME_REGEX, message = UserValidMessage.LOGIN_NAME_FORMAT_ERROR)
|
||||
private String loginName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 用户更新操作实体
|
||||
*
|
||||
* 需要填写的参数:用户的id
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class UserUpdateParam extends UserParam {
|
||||
|
||||
@ApiModelProperty("用户表Id")
|
||||
@NotBlank(message = UserValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class UserQueryParam extends BaseParam {
|
||||
|
||||
@ApiModelProperty("用户类型")
|
||||
@NotNull(message = UserValidMessage.CASUAL_USER_NOT_BLANK)
|
||||
@Range(min = -1, max = 1, message = UserValidMessage.PARAM_FORMAT_ERROR)
|
||||
private Integer casualUser;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.njcn.user.pojo.param;
|
||||
|
||||
import com.njcn.user.pojo.constant.UserValidMessage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/3/22 13:31
|
||||
*/
|
||||
@Data
|
||||
public class UserPasswordParam {
|
||||
|
||||
@ApiModelProperty("用户名")
|
||||
@NotBlank(message = UserValidMessage.USERNAME_NOT_BLANK)
|
||||
private String name;
|
||||
|
||||
|
||||
@ApiModelProperty("密码")
|
||||
@NotBlank(message = UserValidMessage.PASSWORD_NOT_BLANK)
|
||||
private String password;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.njcn.user.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @since 2021-12-15
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_auth_client")
|
||||
public class AuthClient {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 认证客户端Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 客户端名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 资源Id列表
|
||||
*/
|
||||
private String resourceIds;
|
||||
|
||||
/**
|
||||
* 客户端秘钥
|
||||
*/
|
||||
private String clientSecret;
|
||||
|
||||
/**
|
||||
* 域
|
||||
*/
|
||||
private String scope;
|
||||
|
||||
/**
|
||||
* 授权方式
|
||||
*/
|
||||
private String authorizedGrantTypes;
|
||||
|
||||
/**
|
||||
* 回调地址
|
||||
*/
|
||||
private String webServerRedirectUri;
|
||||
|
||||
/**
|
||||
* 权限列表
|
||||
*/
|
||||
private String authorities;
|
||||
|
||||
/**
|
||||
* 认证令牌时效
|
||||
*/
|
||||
private Integer accessTokenValidity;
|
||||
|
||||
/**
|
||||
* 刷新令牌时效
|
||||
*/
|
||||
private Integer refreshTokenValidity;
|
||||
|
||||
/**
|
||||
* 扩展信息
|
||||
*/
|
||||
private String additionalInformation;
|
||||
|
||||
/**
|
||||
* 是否自动放行 0-不放行 1-放行
|
||||
*/
|
||||
private Boolean autoApprove;
|
||||
|
||||
/**
|
||||
* 状态:0-删除 1-正常
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.njcn.user.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2021-12-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_component")
|
||||
public class Component extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 组件Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 资源Id
|
||||
*/
|
||||
private String functionId;
|
||||
|
||||
/**
|
||||
* 父节点Id
|
||||
*/
|
||||
private String pid;
|
||||
|
||||
/**
|
||||
* 上层所有节点Id
|
||||
*/
|
||||
private String pids;
|
||||
|
||||
/**
|
||||
* 功能组件名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 功能组件表示
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 组件路径
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 功能数组
|
||||
*/
|
||||
private String functionGroup;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 状态:0-删除 1-正常
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.njcn.user.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2021-12-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_dept")
|
||||
public class Dept extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 部门表Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 父节点Id(0为根节点)
|
||||
*/
|
||||
private String pid;
|
||||
|
||||
/**
|
||||
* 上层所有节点Id
|
||||
*/
|
||||
private String pids;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* (sys_Area)行政区域Id,自定义部门无需填写部门
|
||||
*/
|
||||
private String area;
|
||||
|
||||
/**
|
||||
* 部门类型 0-非自定义;1-web自定义;2-App自定义;3-web测试
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 部门描述
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 部门状态 0-删除;1-正常;默认正常
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.njcn.user.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2021-12-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_function")
|
||||
public class Function extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 资源表Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 父节点(0为根节点)
|
||||
*/
|
||||
private String pid;
|
||||
|
||||
/**
|
||||
* 所有上层节点
|
||||
*/
|
||||
private String pids;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 资源标识
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 路径
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 图标(没有图标则默认为null)
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 资源类型:0-菜单、1-按钮、2-公共资源、3-服务间调用资源
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 资源描述
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 资源状态:0-删除 1-正常(默认为正常)
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.njcn.user.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2021-12-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_home_page")
|
||||
public class HomePage extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主页面Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 自定义页面名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 布局魔板
|
||||
*/
|
||||
private String layout;
|
||||
|
||||
/**
|
||||
* 路径
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 状态:0-删除 1-正常
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 图标
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.njcn.user.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2021-12-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_role")
|
||||
public class Role extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 角色表Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 角色代码,有需要用做匹配时候用(关联字典表id)
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 角色描述
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 角色状态0-删除;1-正常;默认正常
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 角色类型0-超级管理员 1-其他管理员 2-其他用户
|
||||
*/
|
||||
private Integer type;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.user.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2021-12-13
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_role_component")
|
||||
public class RoleComponent {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 角色Id
|
||||
*/
|
||||
private String roleId;
|
||||
|
||||
/**
|
||||
* 组件Id
|
||||
*/
|
||||
private String componentId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.user.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2021-12-13
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_role_function")
|
||||
public class RoleFunction {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 角色Id
|
||||
*/
|
||||
private String roleId;
|
||||
|
||||
/**
|
||||
* 资源Id
|
||||
*/
|
||||
private String functionId;
|
||||
|
||||
|
||||
}
|
||||
146
pqs-user/user-api/src/main/java/com/njcn/user/pojo/po/User.java
Normal file
146
pqs-user/user-api/src/main/java/com/njcn/user/pojo/po/User.java
Normal file
@@ -0,0 +1,146 @@
|
||||
package com.njcn.user.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @since 2021-12-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_user")
|
||||
public class User extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 登录名
|
||||
*/
|
||||
private String loginName;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 部门Id
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 电话号码
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 用户状态0-删除;1-正常;2-锁定;3-待审核;4-休眠;5-密码过期
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 用户类型 0:超级管理员;1:管理员;2:普通用户
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 数据来源:0-外部推送;1-正常新增;默认正常新增
|
||||
*/
|
||||
private Integer origin;
|
||||
|
||||
/**
|
||||
* 用户类型:0-临时用户 1-正式用户
|
||||
*/
|
||||
private Integer casualUser;
|
||||
|
||||
/**
|
||||
* 密码状态:0-不需要修改 1-需要修改
|
||||
*/
|
||||
private Integer pwdState;
|
||||
|
||||
/**
|
||||
* 短信通知(0-不通知;1-通知)默认不通知
|
||||
*/
|
||||
private Integer smsNotice;
|
||||
|
||||
/**
|
||||
* 邮件通知(0-不通知;1-通知)默认不通知
|
||||
*/
|
||||
private Integer emailNotice;
|
||||
|
||||
/**
|
||||
* 推荐码
|
||||
*/
|
||||
private String referralCode;
|
||||
|
||||
/**
|
||||
* 注册时间
|
||||
*/
|
||||
private LocalDateTime registerTime;
|
||||
|
||||
/**
|
||||
* 密码有效期字段(初始化的时候跟注册时间一样)
|
||||
*/
|
||||
private LocalDateTime pwdValidity;
|
||||
|
||||
/**
|
||||
* 最后一次登录时间
|
||||
*/
|
||||
private LocalDateTime loginTime;
|
||||
|
||||
/**
|
||||
* 限制登录起始IP
|
||||
*/
|
||||
private String limitIpStart;
|
||||
|
||||
/**
|
||||
* 限制登录结束IP
|
||||
*/
|
||||
private String limitIpEnd;
|
||||
|
||||
/**
|
||||
* 限制登录时间段(用'-'分割)
|
||||
*/
|
||||
private String limitTime;
|
||||
|
||||
/**
|
||||
* 密码错误次数
|
||||
*/
|
||||
private Integer loginErrorTimes;
|
||||
|
||||
/**
|
||||
* 首次密码错误时间(半个小时错误次数超过N次数则锁定,解锁后密码错误次数、首次密码错误时间重置)
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime firstErrorTime;
|
||||
|
||||
/**
|
||||
* 用户密码错误锁定时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime lockTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.user.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2021-12-13
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_user_role")
|
||||
public class UserRole {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 角色Id
|
||||
*/
|
||||
private String roleId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.njcn.user.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2021-12-13
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_user_set")
|
||||
public class UserSet {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户配置表Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 工作秘钥
|
||||
*/
|
||||
private String secretKey;
|
||||
|
||||
/**
|
||||
* SM4-1值
|
||||
*/
|
||||
private String standBy;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.njcn.user.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2021-12-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_user_strategy")
|
||||
public class UserStrategy extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户策略Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 密码有效期(1-6月,默认3个月)
|
||||
*/
|
||||
private Integer limitPwdDate;
|
||||
|
||||
/**
|
||||
* 密码错误次数限定(3-20次,默认5次)
|
||||
*/
|
||||
private Integer limitPwdTimes;
|
||||
|
||||
/**
|
||||
* 验证密码错误次数时间范围(5-60分钟,默认30分钟)
|
||||
*/
|
||||
private Integer lockPwdCheck;
|
||||
|
||||
/**
|
||||
* 用户锁定时间(30-60分钟,默认30分钟)
|
||||
*/
|
||||
private Integer lockPwdTime;
|
||||
|
||||
/**
|
||||
* 用户休眠(1-180天,默认90天,临时用户默认3天)
|
||||
*/
|
||||
private Integer sleep;
|
||||
|
||||
/**
|
||||
* 用户注销(1-360天,正常用户默认180天,临时用户默认7天)
|
||||
*/
|
||||
private Integer logout;
|
||||
|
||||
/**
|
||||
* 最大并发数(10-99,默认50)
|
||||
*/
|
||||
private Integer maxNum;
|
||||
|
||||
/**
|
||||
* 类型:0-临时用户 1-正常用户
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 状态:0-删除 1-正常
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.njcn.user.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/1/19 14:56
|
||||
*/
|
||||
@Data
|
||||
public class ComponentVO implements Serializable {
|
||||
|
||||
@ApiModelProperty("组件Id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("资源id")
|
||||
private String functionId;
|
||||
|
||||
@ApiModelProperty("节点")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty("功能组件名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("功能数组")
|
||||
private List<Integer> functionGroup;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("功能组件表示")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("路径")
|
||||
private String path;
|
||||
|
||||
@ApiModelProperty("子级")
|
||||
List<ComponentVO> children;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.njcn.user.pojo.vo;
|
||||
|
||||
import com.njcn.web.pojo.vo.BaseVO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @version 1.0.0
|
||||
* @date 2022年04月15日 11:28
|
||||
*/
|
||||
@Data
|
||||
public class DeptAllTreeVO extends BaseVO {
|
||||
|
||||
@ApiModelProperty("子节点详细信息")
|
||||
private List<DeptAllTreeVO> children;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.njcn.user.pojo.vo;
|
||||
|
||||
import com.njcn.web.pojo.vo.BaseVO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2022/1/4
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class DeptTreeVO extends BaseVO {
|
||||
|
||||
@ApiModelProperty("行政区域id")
|
||||
private String area;
|
||||
|
||||
@ApiModelProperty("行政区域name")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private Integer state;
|
||||
|
||||
@ApiModelProperty("部门类型")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("部门描述")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("子节点详细信息")
|
||||
private List<DeptTreeVO> children;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.njcn.user.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2021/12/28 10:50
|
||||
* 部门管理VO
|
||||
*/
|
||||
@Data
|
||||
public class DeptVO implements Serializable {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 部门表Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 父节点Id(0为根节点)
|
||||
*/
|
||||
private String pid;
|
||||
|
||||
/**
|
||||
* 上层所有节点Id
|
||||
*/
|
||||
private String pids;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 行政区域name
|
||||
*/
|
||||
private String areaName;
|
||||
|
||||
/**
|
||||
* 部门类型 0-非自定义;1-web自定义;2-App自定义
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 部门描述
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 部门状态 0-删除;1-正常;默认正常
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.njcn.user.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/1/17 17:02
|
||||
*/
|
||||
@Data
|
||||
public class FunctionVO implements Serializable {
|
||||
|
||||
@ApiModelProperty("资源Id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("节点")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty("资源标识")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("routeName")
|
||||
private String routeName;
|
||||
|
||||
@ApiModelProperty("路径")
|
||||
private String routePath;
|
||||
|
||||
@ApiModelProperty("图标")
|
||||
private String icon;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("资源类型")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("描述")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("子级")
|
||||
List<FunctionVO> children;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.njcn.user.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
* @date 2022/1/17
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class RoleVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 角色表Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 角色代码,有需要用做匹配时候用(关联字典表id)
|
||||
*/
|
||||
private String code;
|
||||
|
||||
|
||||
/**
|
||||
* 角色描述
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 角色状态0-删除;1-正常;默认正常
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 角色类型0-超级管理员 1-其他管理员 2-其他用户
|
||||
*/
|
||||
private Integer type;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.njcn.user.pojo.vo;
|
||||
|
||||
import com.njcn.user.pojo.param.UserParam;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2021/12/29 14:31
|
||||
*/
|
||||
@Data
|
||||
public class UserVO extends UserParam implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("用户Id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("登录名")
|
||||
private String loginName;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private Integer state;
|
||||
|
||||
@ApiModelProperty("注册时间")
|
||||
private String registerTime;
|
||||
|
||||
@ApiModelProperty("登录时间")
|
||||
private String loginTime;
|
||||
|
||||
@ApiModelProperty("部门名称")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty("角色id")
|
||||
private List<String> roleList;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user