diff --git a/pom.xml b/pom.xml index 4d3a5cf4..47ccc920 100644 --- a/pom.xml +++ b/pom.xml @@ -38,6 +38,7 @@ 4.1.2 2.6.2 3.2.2 + 5.7.1 @@ -180,6 +181,12 @@ ${common-pool.version} + + cn.hutool + hutool-all + ${hutool.version} + + com.ruoyi @@ -271,4 +278,29 @@ + + + public + aliyun nexus + http://maven.aliyun.com/nexus/content/groups/public/ + + true + + + + + + + public + aliyun nexus + http://maven.aliyun.com/nexus/content/groups/public/ + + true + + + false + + + + \ No newline at end of file diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysDept.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysDept.java index 04a4e1b9..7376d1a9 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysDept.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysDept.java @@ -5,198 +5,88 @@ import java.util.List; import javax.validation.constraints.Email; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; + +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.web.domain.BaseEntity; /** * 部门表 sys_dept - * + * * @author ruoyi */ -public class SysDept extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysDept extends BaseEntity { private static final long serialVersionUID = 1L; - /** 部门ID */ + /** + * 部门ID + */ private Long deptId; - /** 父部门ID */ + /** + * 父部门ID + */ private Long parentId; - /** 祖级列表 */ + /** + * 祖级列表 + */ private String ancestors; - /** 部门名称 */ - private String deptName; - - /** 显示顺序 */ - private String orderNum; - - /** 负责人 */ - private String leader; - - /** 联系电话 */ - private String phone; - - /** 邮箱 */ - private String email; - - /** 部门状态:0正常,1停用 */ - private String status; - - /** 删除标志(0代表存在 2代表删除) */ - private String delFlag; - - /** 父部门名称 */ - private String parentName; - - /** 子部门 */ - private List children = new ArrayList(); - - public Long getDeptId() - { - return deptId; - } - - public void setDeptId(Long deptId) - { - this.deptId = deptId; - } - - public Long getParentId() - { - return parentId; - } - - public void setParentId(Long parentId) - { - this.parentId = parentId; - } - - public String getAncestors() - { - return ancestors; - } - - public void setAncestors(String ancestors) - { - this.ancestors = ancestors; - } - + /** + * 部门名称 + */ @NotBlank(message = "部门名称不能为空") @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符") - public String getDeptName() - { - return deptName; - } - - public void setDeptName(String deptName) - { - this.deptName = deptName; - } + private String deptName; + /** + * 显示顺序 + */ @NotBlank(message = "显示顺序不能为空") - public String getOrderNum() - { - return orderNum; - } + private String orderNum; - public void setOrderNum(String orderNum) - { - this.orderNum = orderNum; - } - - public String getLeader() - { - return leader; - } - - public void setLeader(String leader) - { - this.leader = leader; - } + /** + * 负责人 + */ + private String leader; + /** + * 联系电话 + */ @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符") - public String getPhone() - { - return phone; - } - - public void setPhone(String phone) - { - this.phone = phone; - } + private String phone; + /** + * 邮箱 + */ @Email(message = "邮箱格式不正确") @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") - public String getEmail() - { - return email; - } + private String email; - public void setEmail(String email) - { - this.email = email; - } + /** + * 部门状态:0正常,1停用 + */ + private String status; - public String getStatus() - { - return status; - } + /** + * 删除标志(0代表存在 2代表删除) + */ + private String delFlag; - public void setStatus(String status) - { - this.status = status; - } + /** + * 父部门名称 + */ + private String parentName; - public String getDelFlag() - { - return delFlag; - } + /** + * 子部门 + */ + private List children = new ArrayList(); - public void setDelFlag(String delFlag) - { - this.delFlag = delFlag; - } - - public String getParentName() - { - return parentName; - } - - public void setParentName(String parentName) - { - this.parentName = parentName; - } - - public List getChildren() - { - return children; - } - - public void setChildren(List children) - { - this.children = children; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("deptId", getDeptId()) - .append("parentId", getParentId()) - .append("ancestors", getAncestors()) - .append("deptName", getDeptName()) - .append("orderNum", getOrderNum()) - .append("leader", getLeader()) - .append("phone", getPhone()) - .append("email", getEmail()) - .append("status", getStatus()) - .append("delFlag", getDelFlag()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .toString(); - } } diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysFile.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysFile.java index 440df49d..5fe282a3 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysFile.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysFile.java @@ -1,15 +1,19 @@ package com.ruoyi.system.api.domain; +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; /** * 文件信息 - * + * * @author ruoyi */ -public class SysFile -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysFile { /** * 文件名称 */ @@ -20,31 +24,4 @@ public class SysFile */ private String url; - public String getName() - { - return name; - } - - public void setName(String name) - { - this.name = name; - } - - public String getUrl() - { - return url; - } - - public void setUrl(String url) - { - this.url = url; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("name", getName()) - .append("url", getUrl()) - .toString(); - } } diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysOperLog.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysOperLog.java index f3b54ff4..65f342fb 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysOperLog.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysOperLog.java @@ -1,241 +1,119 @@ package com.ruoyi.system.api.domain; import java.util.Date; + import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.core.annotation.Excel; import com.ruoyi.common.core.annotation.Excel.ColumnType; import com.ruoyi.common.core.web.domain.BaseEntity; +import lombok.*; +import lombok.experimental.Accessors; /** * 操作日志记录表 oper_log - * + * * @author ruoyi */ -public class SysOperLog extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysOperLog extends BaseEntity { private static final long serialVersionUID = 1L; - /** 日志主键 */ + /** + * 日志主键 + */ @Excel(name = "操作序号", cellType = ColumnType.NUMERIC) private Long operId; - /** 操作模块 */ + /** + * 操作模块 + */ @Excel(name = "操作模块") private String title; - /** 业务类型(0其它 1新增 2修改 3删除) */ + /** + * 业务类型(0其它 1新增 2修改 3删除) + */ @Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据") private Integer businessType; - /** 业务类型数组 */ + /** + * 业务类型数组 + */ private Integer[] businessTypes; - /** 请求方法 */ + /** + * 请求方法 + */ @Excel(name = "请求方法") private String method; - /** 请求方式 */ + /** + * 请求方式 + */ @Excel(name = "请求方式") private String requestMethod; - /** 操作类别(0其它 1后台用户 2手机端用户) */ + /** + * 操作类别(0其它 1后台用户 2手机端用户) + */ @Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户") private Integer operatorType; - /** 操作人员 */ + /** + * 操作人员 + */ @Excel(name = "操作人员") private String operName; - /** 部门名称 */ + /** + * 部门名称 + */ @Excel(name = "部门名称") private String deptName; - /** 请求url */ + /** + * 请求url + */ @Excel(name = "请求地址") private String operUrl; - /** 操作地址 */ + /** + * 操作地址 + */ @Excel(name = "操作地址") private String operIp; - /** 请求参数 */ + /** + * 请求参数 + */ @Excel(name = "请求参数") private String operParam; - /** 返回参数 */ + /** + * 返回参数 + */ @Excel(name = "返回参数") private String jsonResult; - /** 操作状态(0正常 1异常) */ + /** + * 操作状态(0正常 1异常) + */ @Excel(name = "状态", readConverterExp = "0=正常,1=异常") private Integer status; - /** 错误消息 */ + /** + * 错误消息 + */ @Excel(name = "错误消息") private String errorMsg; - /** 操作时间 */ + /** + * 操作时间 + */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date operTime; - public Long getOperId() - { - return operId; - } - - public void setOperId(Long operId) - { - this.operId = operId; - } - - public String getTitle() - { - return title; - } - - public void setTitle(String title) - { - this.title = title; - } - - public Integer getBusinessType() - { - return businessType; - } - - public void setBusinessType(Integer businessType) - { - this.businessType = businessType; - } - - public Integer[] getBusinessTypes() - { - return businessTypes; - } - - public void setBusinessTypes(Integer[] businessTypes) - { - this.businessTypes = businessTypes; - } - - public String getMethod() - { - return method; - } - - public void setMethod(String method) - { - this.method = method; - } - - public String getRequestMethod() - { - return requestMethod; - } - - public void setRequestMethod(String requestMethod) - { - this.requestMethod = requestMethod; - } - - public Integer getOperatorType() - { - return operatorType; - } - - public void setOperatorType(Integer operatorType) - { - this.operatorType = operatorType; - } - - public String getOperName() - { - return operName; - } - - public void setOperName(String operName) - { - this.operName = operName; - } - - public String getDeptName() - { - return deptName; - } - - public void setDeptName(String deptName) - { - this.deptName = deptName; - } - - public String getOperUrl() - { - return operUrl; - } - - public void setOperUrl(String operUrl) - { - this.operUrl = operUrl; - } - - public String getOperIp() - { - return operIp; - } - - public void setOperIp(String operIp) - { - this.operIp = operIp; - } - - public String getOperParam() - { - return operParam; - } - - public void setOperParam(String operParam) - { - this.operParam = operParam; - } - - public String getJsonResult() - { - return jsonResult; - } - - public void setJsonResult(String jsonResult) - { - this.jsonResult = jsonResult; - } - - public Integer getStatus() - { - return status; - } - - public void setStatus(Integer status) - { - this.status = status; - } - - public String getErrorMsg() - { - return errorMsg; - } - - public void setErrorMsg(String errorMsg) - { - this.errorMsg = errorMsg; - } - - public Date getOperTime() - { - return operTime; - } - - public void setOperTime(Date operTime) - { - this.operTime = operTime; - } } diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysRole.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysRole.java index 6a560f11..d3ed67f3 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysRole.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysRole.java @@ -2,6 +2,9 @@ package com.ruoyi.system.api.domain; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; + +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -10,216 +13,96 @@ import com.ruoyi.common.core.web.domain.BaseEntity; /** * 角色表 sys_role - * + * * @author ruoyi */ -public class SysRole extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysRole extends BaseEntity { private static final long serialVersionUID = 1L; - /** 角色ID */ + /** + * 角色ID + */ @Excel(name = "角色序号", cellType = ColumnType.NUMERIC) private Long roleId; - /** 角色名称 */ + /** + * 角色名称 + */ + @NotBlank(message = "角色名称不能为空") + @Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符") @Excel(name = "角色名称") private String roleName; - /** 角色权限 */ + /** + * 角色权限 + */ + @NotBlank(message = "权限字符不能为空") + @Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符") @Excel(name = "角色权限") private String roleKey; - /** 角色排序 */ + /** + * 角色排序 + */ + @NotBlank(message = "显示顺序不能为空") @Excel(name = "角色排序") private String roleSort; - /** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限) */ + /** + * 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限) + */ @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限") private String dataScope; - /** 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) */ + /** + * 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) + */ private boolean menuCheckStrictly; - /** 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 ) */ + /** + * 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 ) + */ private boolean deptCheckStrictly; - /** 角色状态(0正常 1停用) */ + /** + * 角色状态(0正常 1停用) + */ @Excel(name = "角色状态", readConverterExp = "0=正常,1=停用") private String status; - /** 删除标志(0代表存在 2代表删除) */ + /** + * 删除标志(0代表存在 2代表删除) + */ private String delFlag; - /** 用户是否存在此角色标识 默认不存在 */ + /** + * 用户是否存在此角色标识 默认不存在 + */ private boolean flag = false; - /** 菜单组 */ + /** + * 菜单组 + */ private Long[] menuIds; - /** 部门组(数据权限) */ + /** + * 部门组(数据权限) + */ private Long[] deptIds; - public SysRole() - { - - } - - public SysRole(Long roleId) - { + public SysRole(Long roleId) { this.roleId = roleId; } - public Long getRoleId() - { - return roleId; - } - - public void setRoleId(Long roleId) - { - this.roleId = roleId; - } - - public boolean isAdmin() - { + public boolean isAdmin() { return isAdmin(this.roleId); } - public static boolean isAdmin(Long roleId) - { + public static boolean isAdmin(Long roleId) { return roleId != null && 1L == roleId; } - @NotBlank(message = "角色名称不能为空") - @Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符") - public String getRoleName() - { - return roleName; - } - - public void setRoleName(String roleName) - { - this.roleName = roleName; - } - - @NotBlank(message = "权限字符不能为空") - @Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符") - public String getRoleKey() - { - return roleKey; - } - - public void setRoleKey(String roleKey) - { - this.roleKey = roleKey; - } - - @NotBlank(message = "显示顺序不能为空") - public String getRoleSort() - { - return roleSort; - } - - public void setRoleSort(String roleSort) - { - this.roleSort = roleSort; - } - - public String getDataScope() - { - return dataScope; - } - - public void setDataScope(String dataScope) - { - this.dataScope = dataScope; - } - - public boolean isMenuCheckStrictly() - { - return menuCheckStrictly; - } - - public void setMenuCheckStrictly(boolean menuCheckStrictly) - { - this.menuCheckStrictly = menuCheckStrictly; - } - - public boolean isDeptCheckStrictly() - { - return deptCheckStrictly; - } - - public void setDeptCheckStrictly(boolean deptCheckStrictly) - { - this.deptCheckStrictly = deptCheckStrictly; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - - public String getDelFlag() - { - return delFlag; - } - - public void setDelFlag(String delFlag) - { - this.delFlag = delFlag; - } - - public boolean isFlag() - { - return flag; - } - - public void setFlag(boolean flag) - { - this.flag = flag; - } - - public Long[] getMenuIds() - { - return menuIds; - } - - public void setMenuIds(Long[] menuIds) - { - this.menuIds = menuIds; - } - - public Long[] getDeptIds() - { - return deptIds; - } - - public void setDeptIds(Long[] deptIds) - { - this.deptIds = deptIds; - } - - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("roleId", getRoleId()) - .append("roleName", getRoleName()) - .append("roleKey", getRoleKey()) - .append("roleSort", getRoleSort()) - .append("dataScope", getDataScope()) - .append("menuCheckStrictly", isMenuCheckStrictly()) - .append("deptCheckStrictly", isDeptCheckStrictly()) - .append("status", getStatus()) - .append("delFlag", getDelFlag()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } } diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java index a9bc15e0..d464b09c 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java @@ -5,6 +5,9 @@ import java.util.List; import javax.validation.constraints.Email; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; + +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,311 +19,136 @@ import com.ruoyi.common.core.web.domain.BaseEntity; /** * 用户对象 sys_user - * + * * @author ruoyi */ -public class SysUser extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysUser extends BaseEntity { private static final long serialVersionUID = 1L; - /** 用户ID */ + /** + * 用户ID + */ @Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号") private Long userId; - /** 部门ID */ + /** + * 部门ID + */ @Excel(name = "部门编号", type = Type.IMPORT) private Long deptId; - /** 用户账号 */ + /** + * 用户账号 + */ + @NotBlank(message = "用户账号不能为空") + @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符") @Excel(name = "登录名称") private String userName; - /** 用户昵称 */ + /** + * 用户昵称 + */ + @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符") @Excel(name = "用户名称") private String nickName; - /** 用户邮箱 */ + /** + * 用户邮箱 + */ + @Email(message = "邮箱格式不正确") + @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") @Excel(name = "用户邮箱") private String email; - /** 手机号码 */ + /** + * 手机号码 + */ + @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符") @Excel(name = "手机号码") private String phonenumber; - /** 用户性别 */ + /** + * 用户性别 + */ @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知") private String sex; - /** 用户头像 */ + /** + * 用户头像 + */ private String avatar; - /** 密码 */ + /** + * 密码 + */ + @JsonProperty private String password; - /** 盐加密 */ + /** + * 盐加密 + */ private String salt; - /** 帐号状态(0正常 1停用) */ + /** + * 帐号状态(0正常 1停用) + */ @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用") private String status; - /** 删除标志(0代表存在 2代表删除) */ + /** + * 删除标志(0代表存在 2代表删除) + */ private String delFlag; - /** 最后登录IP */ + /** + * 最后登录IP + */ @Excel(name = "最后登录IP", type = Type.EXPORT) private String loginIp; - /** 最后登录时间 */ + /** + * 最后登录时间 + */ @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT) private Date loginDate; - /** 部门对象 */ + /** + * 部门对象 + */ @Excels({ - @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT), - @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT) + @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT), + @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT) }) private SysDept dept; - /** 角色对象 */ + /** + * 角色对象 + */ private List roles; - /** 角色组 */ + /** + * 角色组 + */ private Long[] roleIds; - /** 岗位组 */ + /** + * 岗位组 + */ private Long[] postIds; - public SysUser() - { - - } - - public SysUser(Long userId) - { + public SysUser(Long userId) { this.userId = userId; } - public Long getUserId() - { - return userId; - } - - public void setUserId(Long userId) - { - this.userId = userId; - } - - public boolean isAdmin() - { + public boolean isAdmin() { return isAdmin(this.userId); } - public static boolean isAdmin(Long userId) - { + public static boolean isAdmin(Long userId) { return userId != null && 1L == userId; } - public Long getDeptId() - { - return deptId; - } - - public void setDeptId(Long deptId) - { - this.deptId = deptId; - } - - @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符") - public String getNickName() - { - return nickName; - } - - public void setNickName(String nickName) - { - this.nickName = nickName; - } - - @NotBlank(message = "用户账号不能为空") - @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符") - public String getUserName() - { - return userName; - } - - public void setUserName(String userName) - { - this.userName = userName; - } - - @Email(message = "邮箱格式不正确") - @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") - public String getEmail() - { - return email; - } - - public void setEmail(String email) - { - this.email = email; - } - - @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符") - public String getPhonenumber() - { - return phonenumber; - } - - public void setPhonenumber(String phonenumber) - { - this.phonenumber = phonenumber; - } - - public String getSex() - { - return sex; - } - - public void setSex(String sex) - { - this.sex = sex; - } - - public String getAvatar() - { - return avatar; - } - - public void setAvatar(String avatar) - { - this.avatar = avatar; - } - - @JsonProperty - public String getPassword() - { - return password; - } - - public void setPassword(String password) - { - this.password = password; - } - - public String getSalt() - { - return salt; - } - - public void setSalt(String salt) - { - this.salt = salt; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - - public String getDelFlag() - { - return delFlag; - } - - public void setDelFlag(String delFlag) - { - this.delFlag = delFlag; - } - - public String getLoginIp() - { - return loginIp; - } - - public void setLoginIp(String loginIp) - { - this.loginIp = loginIp; - } - - public Date getLoginDate() - { - return loginDate; - } - - public void setLoginDate(Date loginDate) - { - this.loginDate = loginDate; - } - - public SysDept getDept() - { - return dept; - } - - public void setDept(SysDept dept) - { - this.dept = dept; - } - - public List getRoles() - { - return roles; - } - - public void setRoles(List roles) - { - this.roles = roles; - } - - public Long[] getRoleIds() - { - return roleIds; - } - - public void setRoleIds(Long[] roleIds) - { - this.roleIds = roleIds; - } - - public Long[] getPostIds() - { - return postIds; - } - - public void setPostIds(Long[] postIds) - { - this.postIds = postIds; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("userId", getUserId()) - .append("deptId", getDeptId()) - .append("userName", getUserName()) - .append("nickName", getNickName()) - .append("email", getEmail()) - .append("phonenumber", getPhonenumber()) - .append("sex", getSex()) - .append("avatar", getAvatar()) - .append("password", getPassword()) - .append("salt", getSalt()) - .append("status", getStatus()) - .append("delFlag", getDelFlag()) - .append("loginIp", getLoginIp()) - .append("loginDate", getLoginDate()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .append("dept", getDept()) - .toString(); - } } diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteFileFallbackFactory.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteFileFallbackFactory.java index bc3b6fff..ce6f0a77 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteFileFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteFileFallbackFactory.java @@ -1,5 +1,6 @@ package com.ruoyi.system.api.factory; +import lombok.extern.slf4j.Slf4j; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -11,23 +12,19 @@ import com.ruoyi.system.api.domain.SysFile; /** * 文件服务降级处理 - * + * * @author ruoyi */ +@Slf4j @Component -public class RemoteFileFallbackFactory implements FallbackFactory -{ - private static final Logger log = LoggerFactory.getLogger(RemoteFileFallbackFactory.class); +public class RemoteFileFallbackFactory implements FallbackFactory { @Override - public RemoteFileService create(Throwable throwable) - { + public RemoteFileService create(Throwable throwable) { log.error("文件服务调用失败:{}", throwable.getMessage()); - return new RemoteFileService() - { + return new RemoteFileService() { @Override - public R upload(MultipartFile file) - { + public R upload(MultipartFile file) { return R.fail("上传文件失败:" + throwable.getMessage()); } }; diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteLogFallbackFactory.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteLogFallbackFactory.java index 0be325d2..1153c659 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteLogFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteLogFallbackFactory.java @@ -1,5 +1,6 @@ package com.ruoyi.system.api.factory; +import lombok.extern.slf4j.Slf4j; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -10,29 +11,24 @@ import com.ruoyi.system.api.domain.SysOperLog; /** * 日志服务降级处理 - * + * * @author ruoyi */ +@Slf4j @Component -public class RemoteLogFallbackFactory implements FallbackFactory -{ - private static final Logger log = LoggerFactory.getLogger(RemoteLogFallbackFactory.class); +public class RemoteLogFallbackFactory implements FallbackFactory { @Override - public RemoteLogService create(Throwable throwable) - { + public RemoteLogService create(Throwable throwable) { log.error("日志服务调用失败:{}", throwable.getMessage()); - return new RemoteLogService() - { + return new RemoteLogService() { @Override - public R saveLog(SysOperLog sysOperLog) - { + public R saveLog(SysOperLog sysOperLog) { return null; } @Override - public R saveLogininfor(String username, String status, String message) - { + public R saveLogininfor(String username, String status, String message) { return null; } }; diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserFallbackFactory.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserFallbackFactory.java index 45900b4a..e0620c91 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/RemoteUserFallbackFactory.java @@ -1,5 +1,6 @@ package com.ruoyi.system.api.factory; +import lombok.extern.slf4j.Slf4j; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -10,23 +11,19 @@ import com.ruoyi.system.api.model.LoginUser; /** * 用户服务降级处理 - * + * * @author ruoyi */ +@Slf4j @Component -public class RemoteUserFallbackFactory implements FallbackFactory -{ - private static final Logger log = LoggerFactory.getLogger(RemoteUserFallbackFactory.class); +public class RemoteUserFallbackFactory implements FallbackFactory { @Override - public RemoteUserService create(Throwable throwable) - { + public RemoteUserService create(Throwable throwable) { log.error("用户服务调用失败:{}", throwable.getMessage()); - return new RemoteUserService() - { + return new RemoteUserService() { @Override - public R getUserInfo(String username) - { + public R getUserInfo(String username) { return R.fail("获取用户失败:" + throwable.getMessage()); } }; diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/model/LoginUser.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/model/LoginUser.java index 2f00e102..7bb8acf4 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/model/LoginUser.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/model/LoginUser.java @@ -2,15 +2,20 @@ package com.ruoyi.system.api.model; import java.io.Serializable; import java.util.Set; + import com.ruoyi.system.api.domain.SysUser; +import lombok.*; +import lombok.experimental.Accessors; /** * 用户信息 * * @author ruoyi */ -public class LoginUser implements Serializable -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class LoginUser implements Serializable { private static final long serialVersionUID = 1L; /** @@ -58,93 +63,4 @@ public class LoginUser implements Serializable */ private SysUser sysUser; - public String getToken() - { - return token; - } - - public void setToken(String token) - { - this.token = token; - } - - public Long getUserid() - { - return userid; - } - - public void setUserid(Long userid) - { - this.userid = userid; - } - - public String getUsername() - { - return username; - } - - public void setUsername(String username) - { - this.username = username; - } - - public Long getLoginTime() - { - return loginTime; - } - - public void setLoginTime(Long loginTime) - { - this.loginTime = loginTime; - } - - public Long getExpireTime() - { - return expireTime; - } - - public void setExpireTime(Long expireTime) - { - this.expireTime = expireTime; - } - - public String getIpaddr() - { - return ipaddr; - } - - public void setIpaddr(String ipaddr) - { - this.ipaddr = ipaddr; - } - - public Set getPermissions() - { - return permissions; - } - - public void setPermissions(Set permissions) - { - this.permissions = permissions; - } - - public Set getRoles() - { - return roles; - } - - public void setRoles(Set roles) - { - this.roles = roles; - } - - public SysUser getSysUser() - { - return sysUser; - } - - public void setSysUser(SysUser sysUser) - { - this.sysUser = sysUser; - } } diff --git a/ruoyi-auth/src/main/java/com/ruoyi/auth/form/LoginBody.java b/ruoyi-auth/src/main/java/com/ruoyi/auth/form/LoginBody.java index b12fb314..0ca799d2 100644 --- a/ruoyi-auth/src/main/java/com/ruoyi/auth/form/LoginBody.java +++ b/ruoyi-auth/src/main/java/com/ruoyi/auth/form/LoginBody.java @@ -1,12 +1,18 @@ package com.ruoyi.auth.form; +import lombok.*; +import lombok.experimental.Accessors; + /** * 用户登录对象 - * + * * @author ruoyi */ -public class LoginBody -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class LoginBody { + /** * 用户名 */ @@ -17,23 +23,4 @@ public class LoginBody */ private String password; - public String getUsername() - { - return username; - } - - public void setUsername(String username) - { - this.username = username; - } - - public String getPassword() - { - return password; - } - - public void setPassword(String password) - { - this.password = password; - } } diff --git a/ruoyi-common/ruoyi-common-core/pom.xml b/ruoyi-common/ruoyi-common-core/pom.xml index 0426a88f..3eba3b9b 100644 --- a/ruoyi-common/ruoyi-common-core/pom.xml +++ b/ruoyi-common/ruoyi-common-core/pom.xml @@ -107,6 +107,16 @@ swagger-annotations + + org.projectlombok + lombok + + + + cn.hutool + hutool-all + + diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java index 8f055531..652a01f9 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/R.java @@ -1,21 +1,30 @@ package com.ruoyi.common.core.domain; import java.io.Serializable; + import com.ruoyi.common.core.constant.Constants; +import lombok.*; +import lombok.experimental.Accessors; /** * 响应信息主体 * * @author ruoyi */ -public class R implements Serializable -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class R implements Serializable { private static final long serialVersionUID = 1L; - /** 成功 */ + /** + * 成功 + */ public static final int SUCCESS = Constants.SUCCESS; - /** 失败 */ + /** + * 失败 + */ public static final int FAIL = Constants.FAIL; private int code; @@ -24,82 +33,40 @@ public class R implements Serializable private T data; - public static R ok() - { + public static R ok() { return restResult(null, SUCCESS, null); } - public static R ok(T data) - { + public static R ok(T data) { return restResult(data, SUCCESS, null); } - public static R ok(T data, String msg) - { + public static R ok(T data, String msg) { return restResult(data, SUCCESS, msg); } - public static R fail() - { + public static R fail() { return restResult(null, FAIL, null); } - public static R fail(String msg) - { + public static R fail(String msg) { return restResult(null, FAIL, msg); } - public static R fail(T data) - { + public static R fail(T data) { return restResult(data, FAIL, null); } - public static R fail(T data, String msg) - { + public static R fail(T data, String msg) { return restResult(data, FAIL, msg); } - public static R fail(int code, String msg) - { + public static R fail(int code, String msg) { return restResult(null, code, msg); } - private static R restResult(T data, int code, String msg) - { - R apiResult = new R<>(); - apiResult.setCode(code); - apiResult.setData(data); - apiResult.setMsg(msg); - return apiResult; + private static R restResult(T data, int code, String msg) { + return new R().setCode(code).setData(data).setMsg(msg); } - public int getCode() - { - return code; - } - - public void setCode(int code) - { - this.code = code; - } - - public String getMsg() - { - return msg; - } - - public void setMsg(String msg) - { - this.msg = msg; - } - - public T getData() - { - return data; - } - - public void setData(T data) - { - this.data = data; - } } diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/CharsetKit.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/CharsetKit.java index 662f817f..7897f346 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/CharsetKit.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/text/CharsetKit.java @@ -19,9 +19,9 @@ public class CharsetKit public static final String GBK = "GBK"; /** ISO-8859-1 */ - public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1); + public static final Charset CHARSET_ISO_8859_1 = StandardCharsets.ISO_8859_1; /** UTF-8 */ - public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8); + public static final Charset CHARSET_UTF_8 = StandardCharsets.UTF_8; /** GBK */ public static final Charset CHARSET_GBK = Charset.forName(GBK); diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java index 1a3070c9..7d8b38cc 100644 --- a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java +++ b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java @@ -1,5 +1,6 @@ package com.ruoyi.common.security.handler; +import lombok.extern.slf4j.Slf4j; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.validation.BindException; @@ -15,20 +16,18 @@ import com.ruoyi.common.core.web.domain.AjaxResult; /** * 全局异常处理器 - * + * * @author ruoyi */ +@Slf4j @RestControllerAdvice -public class GlobalExceptionHandler -{ - private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class); +public class GlobalExceptionHandler { /** * 基础异常 */ @ExceptionHandler(BaseException.class) - public AjaxResult baseException(BaseException e) - { + public AjaxResult baseException(BaseException e) { return AjaxResult.error(e.getDefaultMessage()); } @@ -36,18 +35,15 @@ public class GlobalExceptionHandler * 业务异常 */ @ExceptionHandler(CustomException.class) - public AjaxResult businessException(CustomException e) - { - if (StringUtils.isNull(e.getCode())) - { + public AjaxResult businessException(CustomException e) { + if (StringUtils.isNull(e.getCode())) { return AjaxResult.error(e.getMessage()); } return AjaxResult.error(e.getCode(), e.getMessage()); } @ExceptionHandler(Exception.class) - public AjaxResult handleException(Exception e) - { + public AjaxResult handleException(Exception e) { log.error(e.getMessage(), e); return AjaxResult.error(e.getMessage()); } @@ -56,8 +52,7 @@ public class GlobalExceptionHandler * 自定义验证异常 */ @ExceptionHandler(BindException.class) - public AjaxResult validatedBindException(BindException e) - { + public AjaxResult validatedBindException(BindException e) { log.error(e.getMessage(), e); String message = e.getAllErrors().get(0).getDefaultMessage(); return AjaxResult.error(message); @@ -67,28 +62,25 @@ public class GlobalExceptionHandler * 自定义验证异常 */ @ExceptionHandler(MethodArgumentNotValidException.class) - public Object validExceptionHandler(MethodArgumentNotValidException e) - { + public Object validExceptionHandler(MethodArgumentNotValidException e) { log.error(e.getMessage(), e); String message = e.getBindingResult().getFieldError().getDefaultMessage(); return AjaxResult.error(message); } - + /** * 权限异常 */ @ExceptionHandler(PreAuthorizeException.class) - public AjaxResult preAuthorizeException(PreAuthorizeException e) - { + public AjaxResult preAuthorizeException(PreAuthorizeException e) { return AjaxResult.error("没有权限,请联系管理员授权"); } - + /** * 演示模式异常 */ @ExceptionHandler(DemoModeException.class) - public AjaxResult demoModeException(DemoModeException e) - { + public AjaxResult demoModeException(DemoModeException e) { return AjaxResult.error("演示模式,不允许操作"); } } diff --git a/ruoyi-common/ruoyi-common-swagger/pom.xml b/ruoyi-common/ruoyi-common-swagger/pom.xml index 50e97bd5..5bc71986 100644 --- a/ruoyi-common/ruoyi-common-swagger/pom.xml +++ b/ruoyi-common/ruoyi-common-swagger/pom.xml @@ -30,5 +30,10 @@ ${swagger.fox.version} - + + org.projectlombok + lombok + + + diff --git a/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerProperties.java b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerProperties.java index 8df48e8e..1522b622 100644 --- a/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerProperties.java +++ b/ruoyi-common/ruoyi-common-swagger/src/main/java/com/ruoyi/common/swagger/config/SwaggerProperties.java @@ -2,13 +2,18 @@ package com.ruoyi.common.swagger.config; import java.util.ArrayList; import java.util.List; + +import lombok.*; +import lombok.experimental.Accessors; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; +@Data +@NoArgsConstructor +@Accessors(chain = true) @Component @ConfigurationProperties("swagger") -public class SwaggerProperties -{ +public class SwaggerProperties { /** * 是否开启swagger */ @@ -74,138 +79,10 @@ public class SwaggerProperties **/ private Authorization authorization = new Authorization(); - public Boolean getEnabled() - { - return enabled; - } - - public void setEnabled(Boolean enabled) - { - this.enabled = enabled; - } - - public String getBasePackage() - { - return basePackage; - } - - public void setBasePackage(String basePackage) - { - this.basePackage = basePackage; - } - - public List getBasePath() - { - return basePath; - } - - public void setBasePath(List basePath) - { - this.basePath = basePath; - } - - public List getExcludePath() - { - return excludePath; - } - - public void setExcludePath(List excludePath) - { - this.excludePath = excludePath; - } - - public String getTitle() - { - return title; - } - - public void setTitle(String title) - { - this.title = title; - } - - public String getDescription() - { - return description; - } - - public void setDescription(String description) - { - this.description = description; - } - - public String getVersion() - { - return version; - } - - public void setVersion(String version) - { - this.version = version; - } - - public String getLicense() - { - return license; - } - - public void setLicense(String license) - { - this.license = license; - } - - public String getLicenseUrl() - { - return licenseUrl; - } - - public void setLicenseUrl(String licenseUrl) - { - this.licenseUrl = licenseUrl; - } - - public String getTermsOfServiceUrl() - { - return termsOfServiceUrl; - } - - public void setTermsOfServiceUrl(String termsOfServiceUrl) - { - this.termsOfServiceUrl = termsOfServiceUrl; - } - - public String getHost() - { - return host; - } - - public void setHost(String host) - { - this.host = host; - } - - public Contact getContact() - { - return contact; - } - - public void setContact(Contact contact) - { - this.contact = contact; - } - - public Authorization getAuthorization() - { - return authorization; - } - - public void setAuthorization(Authorization authorization) - { - this.authorization = authorization; - } - - public static class Contact - { + @Data + @NoArgsConstructor + @Accessors(chain = true) + public static class Contact { /** * 联系人 **/ @@ -219,39 +96,12 @@ public class SwaggerProperties **/ private String email = ""; - public String getName() - { - return name; - } - - public void setName(String name) - { - this.name = name; - } - - public String getUrl() - { - return url; - } - - public void setUrl(String url) - { - this.url = url; - } - - public String getEmail() - { - return email; - } - - public void setEmail(String email) - { - this.email = email; - } } - public static class Authorization - { + @Data + @NoArgsConstructor + @Accessors(chain = true) + public static class Authorization { /** * 鉴权策略ID,需要和SecurityReferences ID保持一致 */ @@ -269,49 +119,12 @@ public class SwaggerProperties private List tokenUrlList = new ArrayList<>(); - public String getName() - { - return name; - } - - public void setName(String name) - { - this.name = name; - } - - public String getAuthRegex() - { - return authRegex; - } - - public void setAuthRegex(String authRegex) - { - this.authRegex = authRegex; - } - - public List getAuthorizationScopeList() - { - return authorizationScopeList; - } - - public void setAuthorizationScopeList(List authorizationScopeList) - { - this.authorizationScopeList = authorizationScopeList; - } - - public List getTokenUrlList() - { - return tokenUrlList; - } - - public void setTokenUrlList(List tokenUrlList) - { - this.tokenUrlList = tokenUrlList; - } } - public static class AuthorizationScope - { + @Data + @NoArgsConstructor + @Accessors(chain = true) + public static class AuthorizationScope { /** * 作用域名称 */ @@ -322,24 +135,5 @@ public class SwaggerProperties */ private String description = ""; - public String getScope() - { - return scope; - } - - public void setScope(String scope) - { - this.scope = scope; - } - - public String getDescription() - { - return description; - } - - public void setDescription(String description) - { - this.description = description; - } } } \ No newline at end of file diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/IgnoreWhiteProperties.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/IgnoreWhiteProperties.java index fbfd04cc..25edba94 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/IgnoreWhiteProperties.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/IgnoreWhiteProperties.java @@ -2,32 +2,29 @@ package com.ruoyi.gateway.config.properties; import java.util.ArrayList; import java.util.List; + +import lombok.*; +import lombok.experimental.Accessors; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.context.annotation.Configuration; /** * 放行白名单配置 - * + * * @author ruoyi */ +@Data +@NoArgsConstructor +@Accessors(chain = true) @Configuration @RefreshScope @ConfigurationProperties(prefix = "ignore") -public class IgnoreWhiteProperties -{ +public class IgnoreWhiteProperties { + /** * 放行白名单配置,网关不校验此处的白名单 */ private List whites = new ArrayList<>(); - public List getWhites() - { - return whites; - } - - public void setWhites(List whites) - { - this.whites = whites; - } } diff --git a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/config/MinioConfig.java b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/config/MinioConfig.java index ee3e14c2..775562ab 100644 --- a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/config/MinioConfig.java +++ b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/config/MinioConfig.java @@ -1,5 +1,7 @@ package com.ruoyi.file.config; +import lombok.*; +import lombok.experimental.Accessors; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -10,10 +12,13 @@ import io.minio.MinioClient; * * @author ruoyi */ +@Data +@NoArgsConstructor +@Accessors(chain = true) @Configuration @ConfigurationProperties(prefix = "minio") -public class MinioConfig -{ +public class MinioConfig { + /** * 服务地址 */ @@ -34,49 +39,8 @@ public class MinioConfig */ private String bucketName; - public String getUrl() - { - return url; - } - - public void setUrl(String url) - { - this.url = url; - } - - public String getAccessKey() - { - return accessKey; - } - - public void setAccessKey(String accessKey) - { - this.accessKey = accessKey; - } - - public String getSecretKey() - { - return secretKey; - } - - public void setSecretKey(String secretKey) - { - this.secretKey = secretKey; - } - - public String getBucketName() - { - return bucketName; - } - - public void setBucketName(String bucketName) - { - this.bucketName = bucketName; - } - @Bean - public MinioClient getMinioClient() - { + public MinioClient getMinioClient() { return MinioClient.builder().endpoint(url).credentials(accessKey, secretKey).build(); } } diff --git a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/config/ResourcesConfig.java b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/config/ResourcesConfig.java index 7e443309..dd3f60b4 100644 --- a/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/config/ResourcesConfig.java +++ b/ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/config/ResourcesConfig.java @@ -1,6 +1,7 @@ package com.ruoyi.file.config; import java.io.File; + import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; @@ -8,12 +9,12 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * 通用映射配置 - * + * * @author ruoyi */ @Configuration -public class ResourcesConfig implements WebMvcConfigurer -{ +public class ResourcesConfig implements WebMvcConfigurer { + /** * 上传文件存储在本地的根路径 */ @@ -27,8 +28,7 @@ public class ResourcesConfig implements WebMvcConfigurer public String localFilePrefix; @Override - public void addResourceHandlers(ResourceHandlerRegistry registry) - { + public void addResourceHandlers(ResourceHandlerRegistry registry) { /** 本地文件上传路径 */ registry.addResourceHandler(localFilePrefix + "/**") .addResourceLocations("file:" + localFilePath + File.separator); diff --git a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/domain/GenTable.java b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/domain/GenTable.java index d08b7325..2733c554 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/domain/GenTable.java +++ b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/domain/GenTable.java @@ -3,6 +3,9 @@ package com.ruoyi.gen.domain; import java.util.List; import javax.validation.Valid; import javax.validation.constraints.NotBlank; + +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.ArrayUtils; import com.ruoyi.common.core.constant.GenConstants; import com.ruoyi.common.core.utils.StringUtils; @@ -10,358 +13,169 @@ import com.ruoyi.common.core.web.domain.BaseEntity; /** * 业务表 gen_table - * + * * @author ruoyi */ -public class GenTable extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class GenTable extends BaseEntity { private static final long serialVersionUID = 1L; - /** 编号 */ + /** + * 编号 + */ private Long tableId; - /** 表名称 */ + /** + * 表名称 + */ @NotBlank(message = "表名称不能为空") private String tableName; - /** 表描述 */ + /** + * 表描述 + */ @NotBlank(message = "表描述不能为空") private String tableComment; - /** 关联父表的表名 */ + /** + * 关联父表的表名 + */ private String subTableName; - /** 本表关联父表的外键名 */ + /** + * 本表关联父表的外键名 + */ private String subTableFkName; - /** 实体类名称(首字母大写) */ + /** + * 实体类名称(首字母大写) + */ @NotBlank(message = "实体类名称不能为空") private String className; - /** 使用的模板(crud单表操作 tree树表操作 sub主子表操作) */ + /** + * 使用的模板(crud单表操作 tree树表操作 sub主子表操作) + */ private String tplCategory; - /** 生成包路径 */ + /** + * 生成包路径 + */ @NotBlank(message = "生成包路径不能为空") private String packageName; - /** 生成模块名 */ + /** + * 生成模块名 + */ @NotBlank(message = "生成模块名不能为空") private String moduleName; - /** 生成业务名 */ + /** + * 生成业务名 + */ @NotBlank(message = "生成业务名不能为空") private String businessName; - /** 生成功能名 */ + /** + * 生成功能名 + */ @NotBlank(message = "生成功能名不能为空") private String functionName; - /** 生成作者 */ + /** + * 生成作者 + */ @NotBlank(message = "作者不能为空") private String functionAuthor; - /** 生成代码方式(0zip压缩包 1自定义路径) */ + /** + * 生成代码方式(0zip压缩包 1自定义路径) + */ private String genType; - /** 生成路径(不填默认项目路径) */ + /** + * 生成路径(不填默认项目路径) + */ private String genPath; - /** 主键信息 */ + /** + * 主键信息 + */ private GenTableColumn pkColumn; - /** 子表信息 */ + /** + * 子表信息 + */ private GenTable subTable; - /** 表列信息 */ + /** + * 表列信息 + */ @Valid private List columns; - /** 其它生成选项 */ + /** + * 其它生成选项 + */ private String options; - /** 树编码字段 */ + /** + * 树编码字段 + */ private String treeCode; - /** 树父编码字段 */ + /** + * 树父编码字段 + */ private String treeParentCode; - /** 树名称字段 */ + /** + * 树名称字段 + */ private String treeName; - /** 上级菜单ID字段 */ + /** + * 上级菜单ID字段 + */ private String parentMenuId; - /** 上级菜单名称字段 */ + /** + * 上级菜单名称字段 + */ private String parentMenuName; - public Long getTableId() - { - return tableId; - } - - public void setTableId(Long tableId) - { - this.tableId = tableId; - } - - public String getTableName() - { - return tableName; - } - - public void setTableName(String tableName) - { - this.tableName = tableName; - } - - public String getTableComment() - { - return tableComment; - } - - public void setTableComment(String tableComment) - { - this.tableComment = tableComment; - } - - public String getSubTableName() - { - return subTableName; - } - - public void setSubTableName(String subTableName) - { - this.subTableName = subTableName; - } - - public String getSubTableFkName() - { - return subTableFkName; - } - - public void setSubTableFkName(String subTableFkName) - { - this.subTableFkName = subTableFkName; - } - - public String getClassName() - { - return className; - } - - public void setClassName(String className) - { - this.className = className; - } - - public String getTplCategory() - { - return tplCategory; - } - - public void setTplCategory(String tplCategory) - { - this.tplCategory = tplCategory; - } - - public String getPackageName() - { - return packageName; - } - - public void setPackageName(String packageName) - { - this.packageName = packageName; - } - - public String getModuleName() - { - return moduleName; - } - - public void setModuleName(String moduleName) - { - this.moduleName = moduleName; - } - - public String getBusinessName() - { - return businessName; - } - - public void setBusinessName(String businessName) - { - this.businessName = businessName; - } - - public String getFunctionName() - { - return functionName; - } - - public void setFunctionName(String functionName) - { - this.functionName = functionName; - } - - public String getFunctionAuthor() - { - return functionAuthor; - } - - public void setFunctionAuthor(String functionAuthor) - { - this.functionAuthor = functionAuthor; - } - - public String getGenType() - { - return genType; - } - - public void setGenType(String genType) - { - this.genType = genType; - } - - public String getGenPath() - { - return genPath; - } - - public void setGenPath(String genPath) - { - this.genPath = genPath; - } - - public GenTableColumn getPkColumn() - { - return pkColumn; - } - - public void setPkColumn(GenTableColumn pkColumn) - { - this.pkColumn = pkColumn; - } - - public GenTable getSubTable() - { - return subTable; - } - - public void setSubTable(GenTable subTable) - { - this.subTable = subTable; - } - public List getColumns() - { - return columns; - } - - public void setColumns(List columns) - { - this.columns = columns; - } - - public String getOptions() - { - return options; - } - - public void setOptions(String options) - { - this.options = options; - } - - public String getTreeCode() - { - return treeCode; - } - - public void setTreeCode(String treeCode) - { - this.treeCode = treeCode; - } - - public String getTreeParentCode() - { - return treeParentCode; - } - - public void setTreeParentCode(String treeParentCode) - { - this.treeParentCode = treeParentCode; - } - - public String getTreeName() - { - return treeName; - } - - public void setTreeName(String treeName) - { - this.treeName = treeName; - } - - public String getParentMenuId() - { - return parentMenuId; - } - - public void setParentMenuId(String parentMenuId) - { - this.parentMenuId = parentMenuId; - } - - public String getParentMenuName() - { - return parentMenuName; - } - - public void setParentMenuName(String parentMenuName) - { - this.parentMenuName = parentMenuName; - } - - public boolean isSub() - { + public boolean isSub() { return isSub(this.tplCategory); } - public static boolean isSub(String tplCategory) - { + public static boolean isSub(String tplCategory) { return tplCategory != null && StringUtils.equals(GenConstants.TPL_SUB, tplCategory); } - public boolean isTree() - { + + public boolean isTree() { return isTree(this.tplCategory); } - public static boolean isTree(String tplCategory) - { + public static boolean isTree(String tplCategory) { return tplCategory != null && StringUtils.equals(GenConstants.TPL_TREE, tplCategory); } - public boolean isCrud() - { + public boolean isCrud() { return isCrud(this.tplCategory); } - public static boolean isCrud(String tplCategory) - { + public static boolean isCrud(String tplCategory) { return tplCategory != null && StringUtils.equals(GenConstants.TPL_CRUD, tplCategory); } - public boolean isSuperColumn(String javaField) - { + public boolean isSuperColumn(String javaField) { return isSuperColumn(this.tplCategory, javaField); } - public static boolean isSuperColumn(String tplCategory, String javaField) - { - if (isTree(tplCategory)) - { + public static boolean isSuperColumn(String tplCategory, String javaField) { + if (isTree(tplCategory)) { return StringUtils.equalsAnyIgnoreCase(javaField, ArrayUtils.addAll(GenConstants.TREE_ENTITY, GenConstants.BASE_ENTITY)); } diff --git a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/domain/GenTableColumn.java b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/domain/GenTableColumn.java index 2f3e99df..301b82d3 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/domain/GenTableColumn.java +++ b/ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/domain/GenTableColumn.java @@ -4,333 +4,176 @@ import javax.validation.constraints.NotBlank; import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.core.web.domain.BaseEntity; +import lombok.*; +import lombok.experimental.Accessors; /** * 代码生成业务字段表 gen_table_column - * + * * @author ruoyi */ -public class GenTableColumn extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class GenTableColumn extends BaseEntity { private static final long serialVersionUID = 1L; - /** 编号 */ + /** + * 编号 + */ private Long columnId; - /** 归属表编号 */ + /** + * 归属表编号 + */ private Long tableId; - /** 列名称 */ + /** + * 列名称 + */ private String columnName; - /** 列描述 */ + /** + * 列描述 + */ private String columnComment; - /** 列类型 */ + /** + * 列类型 + */ private String columnType; - /** JAVA类型 */ + /** + * JAVA类型 + */ private String javaType; - /** JAVA字段名 */ + /** + * JAVA字段名 + */ @NotBlank(message = "Java属性不能为空") private String javaField; - /** 是否主键(1是) */ + /** + * 是否主键(1是) + */ private String isPk; - /** 是否自增(1是) */ + /** + * 是否自增(1是) + */ private String isIncrement; - /** 是否必填(1是) */ + /** + * 是否必填(1是) + */ private String isRequired; - /** 是否为插入字段(1是) */ + /** + * 是否为插入字段(1是) + */ private String isInsert; - /** 是否编辑字段(1是) */ + /** + * 是否编辑字段(1是) + */ private String isEdit; - /** 是否列表字段(1是) */ + /** + * 是否列表字段(1是) + */ private String isList; - /** 是否查询字段(1是) */ + /** + * 是否查询字段(1是) + */ private String isQuery; - /** 查询方式(EQ等于、NE不等于、GT大于、LT小于、LIKE模糊、BETWEEN范围) */ + /** + * 查询方式(EQ等于、NE不等于、GT大于、LT小于、LIKE模糊、BETWEEN范围) + */ private String queryType; - /** 显示类型(input文本框、textarea文本域、select下拉框、checkbox复选框、radio单选框、datetime日期控件、image图片上传控件、upload文件上传控件、editor富文本控件) */ + /** + * 显示类型(input文本框、textarea文本域、select下拉框、checkbox复选框、radio单选框、datetime日期控件、image图片上传控件、upload文件上传控件、editor富文本控件) + */ private String htmlType; - /** 字典类型 */ + /** + * 字典类型 + */ private String dictType; - /** 排序 */ + /** + * 排序 + */ private Integer sort; - public void setColumnId(Long columnId) - { - this.columnId = columnId; - } - - public Long getColumnId() - { - return columnId; - } - - public void setTableId(Long tableId) - { - this.tableId = tableId; - } - - public Long getTableId() - { - return tableId; - } - - public void setColumnName(String columnName) - { - this.columnName = columnName; - } - - public String getColumnName() - { - return columnName; - } - - public void setColumnComment(String columnComment) - { - this.columnComment = columnComment; - } - - public String getColumnComment() - { - return columnComment; - } - - public void setColumnType(String columnType) - { - this.columnType = columnType; - } - - public String getColumnType() - { - return columnType; - } - - public void setJavaType(String javaType) - { - this.javaType = javaType; - } - - public String getJavaType() - { - return javaType; - } - - public void setJavaField(String javaField) - { - this.javaField = javaField; - } - - public String getJavaField() - { - return javaField; - } - - public String getCapJavaField() - { + public String getCapJavaField() { return StringUtils.capitalize(javaField); } - public void setIsPk(String isPk) - { - this.isPk = isPk; - } - - public String getIsPk() - { - return isPk; - } - - public boolean isPk() - { + public boolean isPk() { return isPk(this.isPk); } - public boolean isPk(String isPk) - { + public boolean isPk(String isPk) { return isPk != null && StringUtils.equals("1", isPk); } - public String getIsIncrement() - { - return isIncrement; - } - - public void setIsIncrement(String isIncrement) - { - this.isIncrement = isIncrement; - } - - public boolean isIncrement() - { + public boolean isIncrement() { return isIncrement(this.isIncrement); } - public boolean isIncrement(String isIncrement) - { + public boolean isIncrement(String isIncrement) { return isIncrement != null && StringUtils.equals("1", isIncrement); } - public void setIsRequired(String isRequired) - { - this.isRequired = isRequired; - } - - public String getIsRequired() - { - return isRequired; - } - - public boolean isRequired() - { + public boolean isRequired() { return isRequired(this.isRequired); } - public boolean isRequired(String isRequired) - { + public boolean isRequired(String isRequired) { return isRequired != null && StringUtils.equals("1", isRequired); } - public void setIsInsert(String isInsert) - { - this.isInsert = isInsert; - } - - public String getIsInsert() - { - return isInsert; - } - - public boolean isInsert() - { + public boolean isInsert() { return isInsert(this.isInsert); } - public boolean isInsert(String isInsert) - { + public boolean isInsert(String isInsert) { return isInsert != null && StringUtils.equals("1", isInsert); } - public void setIsEdit(String isEdit) - { - this.isEdit = isEdit; - } - - public String getIsEdit() - { - return isEdit; - } - - public boolean isEdit() - { + public boolean isEdit() { return isInsert(this.isEdit); } - public boolean isEdit(String isEdit) - { + public boolean isEdit(String isEdit) { return isEdit != null && StringUtils.equals("1", isEdit); } - public void setIsList(String isList) - { - this.isList = isList; - } - - public String getIsList() - { - return isList; - } - - public boolean isList() - { + public boolean isList() { return isList(this.isList); } - public boolean isList(String isList) - { + public boolean isList(String isList) { return isList != null && StringUtils.equals("1", isList); } - public void setIsQuery(String isQuery) - { - this.isQuery = isQuery; - } - - public String getIsQuery() - { - return isQuery; - } - - public boolean isQuery() - { + public boolean isQuery() { return isQuery(this.isQuery); } - public boolean isQuery(String isQuery) - { + public boolean isQuery(String isQuery) { return isQuery != null && StringUtils.equals("1", isQuery); } - public void setQueryType(String queryType) - { - this.queryType = queryType; - } - - public String getQueryType() - { - return queryType; - } - - public String getHtmlType() - { - return htmlType; - } - - public void setHtmlType(String htmlType) - { - this.htmlType = htmlType; - } - - public void setDictType(String dictType) - { - this.dictType = dictType; - } - - public String getDictType() - { - return dictType; - } - - public void setSort(Integer sort) - { - this.sort = sort; - } - - public Integer getSort() - { - return sort; - } - - public boolean isSuperColumn() - { + public boolean isSuperColumn() { return isSuperColumn(this.javaField); } - public static boolean isSuperColumn(String javaField) - { + public static boolean isSuperColumn(String javaField) { return StringUtils.equalsAnyIgnoreCase(javaField, // BaseEntity "createBy", "createTime", "updateBy", "updateTime", "remark", @@ -338,36 +181,28 @@ public class GenTableColumn extends BaseEntity "parentName", "parentId", "orderNum", "ancestors"); } - public boolean isUsableColumn() - { + public boolean isUsableColumn() { return isUsableColumn(javaField); } - public static boolean isUsableColumn(String javaField) - { + public static boolean isUsableColumn(String javaField) { // isSuperColumn()中的名单用于避免生成多余Domain属性,若某些属性在生成页面时需要用到不能忽略,则放在此处白名单 return StringUtils.equalsAnyIgnoreCase(javaField, "parentId", "orderNum", "remark"); } - public String readConverterExp() - { + public String readConverterExp() { String remarks = StringUtils.substringBetween(this.columnComment, "(", ")"); StringBuffer sb = new StringBuffer(); - if (StringUtils.isNotEmpty(remarks)) - { - for (String value : remarks.split(" ")) - { - if (StringUtils.isNotEmpty(value)) - { + if (StringUtils.isNotEmpty(remarks)) { + for (String value : remarks.split(" ")) { + if (StringUtils.isNotEmpty(value)) { Object startStr = value.subSequence(0, 1); String endStr = value.substring(1); sb.append("").append(startStr).append("=").append(endStr).append(","); } } return sb.deleteCharAt(sb.length() - 1).toString(); - } - else - { + } else { return this.columnComment; } } diff --git a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/domain/SysJob.java b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/domain/SysJob.java index 7877b687..87c7f500 100644 --- a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/domain/SysJob.java +++ b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/domain/SysJob.java @@ -3,6 +3,9 @@ package com.ruoyi.job.domain; import java.util.Date; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; + +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.fasterxml.jackson.annotation.JsonFormat; @@ -15,157 +18,75 @@ import com.ruoyi.job.util.CronUtils; /** * 定时任务调度表 sys_job - * + * * @author ruoyi */ -public class SysJob extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysJob extends BaseEntity { private static final long serialVersionUID = 1L; - /** 任务ID */ + /** + * 任务ID + */ @Excel(name = "任务序号", cellType = ColumnType.NUMERIC) private Long jobId; - /** 任务名称 */ + /** + * 任务名称 + */ + @NotBlank(message = "任务名称不能为空") + @Size(min = 0, max = 64, message = "任务名称不能超过64个字符") @Excel(name = "任务名称") private String jobName; - /** 任务组名 */ + /** + * 任务组名 + */ @Excel(name = "任务组名") private String jobGroup; - /** 调用目标字符串 */ + /** + * 调用目标字符串 + */ + @NotBlank(message = "调用目标字符串不能为空") + @Size(min = 0, max = 500, message = "调用目标字符串长度不能超过500个字符") @Excel(name = "调用目标字符串") private String invokeTarget; - /** cron执行表达式 */ + /** + * cron执行表达式 + */ + @NotBlank(message = "Cron执行表达式不能为空") + @Size(min = 0, max = 255, message = "Cron执行表达式不能超过255个字符") @Excel(name = "执行表达式 ") private String cronExpression; - /** cron计划策略 */ + /** + * cron计划策略 + */ @Excel(name = "计划策略 ", readConverterExp = "0=默认,1=立即触发执行,2=触发一次执行,3=不触发立即执行") private String misfirePolicy = ScheduleConstants.MISFIRE_DEFAULT; - /** 是否并发执行(0允许 1禁止) */ + /** + * 是否并发执行(0允许 1禁止) + */ @Excel(name = "并发执行", readConverterExp = "0=允许,1=禁止") private String concurrent; - /** 任务状态(0正常 1暂停) */ + /** + * 任务状态(0正常 1暂停) + */ @Excel(name = "任务状态", readConverterExp = "0=正常,1=暂停") private String status; - public Long getJobId() - { - return jobId; - } - - public void setJobId(Long jobId) - { - this.jobId = jobId; - } - - @NotBlank(message = "任务名称不能为空") - @Size(min = 0, max = 64, message = "任务名称不能超过64个字符") - public String getJobName() - { - return jobName; - } - - public void setJobName(String jobName) - { - this.jobName = jobName; - } - - public String getJobGroup() - { - return jobGroup; - } - - public void setJobGroup(String jobGroup) - { - this.jobGroup = jobGroup; - } - - @NotBlank(message = "调用目标字符串不能为空") - @Size(min = 0, max = 500, message = "调用目标字符串长度不能超过500个字符") - public String getInvokeTarget() - { - return invokeTarget; - } - - public void setInvokeTarget(String invokeTarget) - { - this.invokeTarget = invokeTarget; - } - - @NotBlank(message = "Cron执行表达式不能为空") - @Size(min = 0, max = 255, message = "Cron执行表达式不能超过255个字符") - public String getCronExpression() - { - return cronExpression; - } - - public void setCronExpression(String cronExpression) - { - this.cronExpression = cronExpression; - } - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - public Date getNextValidTime() - { - if (StringUtils.isNotEmpty(cronExpression)) - { + public Date getNextValidTime() { + if (StringUtils.isNotEmpty(cronExpression)) { return CronUtils.getNextExecution(cronExpression); } return null; } - public String getMisfirePolicy() - { - return misfirePolicy; - } - - public void setMisfirePolicy(String misfirePolicy) - { - this.misfirePolicy = misfirePolicy; - } - - public String getConcurrent() - { - return concurrent; - } - - public void setConcurrent(String concurrent) - { - this.concurrent = concurrent; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("jobId", getJobId()) - .append("jobName", getJobName()) - .append("jobGroup", getJobGroup()) - .append("cronExpression", getCronExpression()) - .append("nextValidTime", getNextValidTime()) - .append("misfirePolicy", getMisfirePolicy()) - .append("concurrent", getConcurrent()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } } \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/domain/SysJobLog.java b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/domain/SysJobLog.java index ec863c9a..fc4425a0 100644 --- a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/domain/SysJobLog.java +++ b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/domain/SysJobLog.java @@ -1,6 +1,9 @@ package com.ruoyi.job.domain; import java.util.Date; + +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -8,148 +11,65 @@ import com.ruoyi.common.core.web.domain.BaseEntity; /** * 定时任务调度日志表 sys_job_log - * + * * @author ruoyi */ -public class SysJobLog extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysJobLog extends BaseEntity { private static final long serialVersionUID = 1L; - /** ID */ + /** + * ID + */ @Excel(name = "日志序号") private Long jobLogId; - /** 任务名称 */ + /** + * 任务名称 + */ @Excel(name = "任务名称") private String jobName; - /** 任务组名 */ + /** + * 任务组名 + */ @Excel(name = "任务组名") private String jobGroup; - /** 调用目标字符串 */ + /** + * 调用目标字符串 + */ @Excel(name = "调用目标字符串") private String invokeTarget; - /** 日志信息 */ + /** + * 日志信息 + */ @Excel(name = "日志信息") private String jobMessage; - /** 执行状态(0正常 1失败) */ + /** + * 执行状态(0正常 1失败) + */ @Excel(name = "执行状态", readConverterExp = "0=正常,1=失败") private String status; - /** 异常信息 */ + /** + * 异常信息 + */ @Excel(name = "异常信息") private String exceptionInfo; - /** 开始时间 */ + /** + * 开始时间 + */ private Date startTime; - /** 停止时间 */ + /** + * 停止时间 + */ private Date stopTime; - public Long getJobLogId() - { - return jobLogId; - } - - public void setJobLogId(Long jobLogId) - { - this.jobLogId = jobLogId; - } - - public String getJobName() - { - return jobName; - } - - public void setJobName(String jobName) - { - this.jobName = jobName; - } - - public String getJobGroup() - { - return jobGroup; - } - - public void setJobGroup(String jobGroup) - { - this.jobGroup = jobGroup; - } - - public String getInvokeTarget() - { - return invokeTarget; - } - - public void setInvokeTarget(String invokeTarget) - { - this.invokeTarget = invokeTarget; - } - - public String getJobMessage() - { - return jobMessage; - } - - public void setJobMessage(String jobMessage) - { - this.jobMessage = jobMessage; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - - public String getExceptionInfo() - { - return exceptionInfo; - } - - public void setExceptionInfo(String exceptionInfo) - { - this.exceptionInfo = exceptionInfo; - } - - public Date getStartTime() - { - return startTime; - } - - public void setStartTime(Date startTime) - { - this.startTime = startTime; - } - - public Date getStopTime() - { - return stopTime; - } - - public void setStopTime(Date stopTime) - { - this.stopTime = stopTime; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("jobLogId", getJobLogId()) - .append("jobName", getJobName()) - .append("jobGroup", getJobGroup()) - .append("jobMessage", getJobMessage()) - .append("status", getStatus()) - .append("exceptionInfo", getExceptionInfo()) - .append("startTime", getStartTime()) - .append("stopTime", getStopTime()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java index 5b3c5408..8575a8a5 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java @@ -2,6 +2,9 @@ package com.ruoyi.system.domain; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; + +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -10,102 +13,49 @@ import com.ruoyi.common.core.web.domain.BaseEntity; /** * 参数配置表 sys_config - * + * * @author ruoyi */ -public class SysConfig extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysConfig extends BaseEntity { private static final long serialVersionUID = 1L; - /** 参数主键 */ + /** + * 参数主键 + */ @Excel(name = "参数主键", cellType = ColumnType.NUMERIC) private Long configId; - /** 参数名称 */ + /** + * 参数名称 + */ + @NotBlank(message = "参数名称不能为空") + @Size(min = 0, max = 100, message = "参数名称不能超过100个字符") @Excel(name = "参数名称") private String configName; - /** 参数键名 */ + /** + * 参数键名 + */ + @NotBlank(message = "参数键名长度不能为空") + @Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符") @Excel(name = "参数键名") private String configKey; - /** 参数键值 */ + /** + * 参数键值 + */ + @NotBlank(message = "参数键值不能为空") + @Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符") @Excel(name = "参数键值") private String configValue; - /** 系统内置(Y是 N否) */ + /** + * 系统内置(Y是 N否) + */ @Excel(name = "系统内置", readConverterExp = "Y=是,N=否") private String configType; - public Long getConfigId() - { - return configId; - } - - public void setConfigId(Long configId) - { - this.configId = configId; - } - - @NotBlank(message = "参数名称不能为空") - @Size(min = 0, max = 100, message = "参数名称不能超过100个字符") - public String getConfigName() - { - return configName; - } - - public void setConfigName(String configName) - { - this.configName = configName; - } - - @NotBlank(message = "参数键名长度不能为空") - @Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符") - public String getConfigKey() - { - return configKey; - } - - public void setConfigKey(String configKey) - { - this.configKey = configKey; - } - - @NotBlank(message = "参数键值不能为空") - @Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符") - public String getConfigValue() - { - return configValue; - } - - public void setConfigValue(String configValue) - { - this.configValue = configValue; - } - - public String getConfigType() - { - return configType; - } - - public void setConfigType(String configType) - { - this.configType = configType; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("configId", getConfigId()) - .append("configName", getConfigName()) - .append("configKey", getConfigKey()) - .append("configValue", getConfigValue()) - .append("configType", getConfigType()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictData.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictData.java index 2d5e17de..9b193463 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictData.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictData.java @@ -2,6 +2,9 @@ package com.ruoyi.system.domain; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; + +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -11,166 +14,76 @@ import com.ruoyi.common.core.web.domain.BaseEntity; /** * 字典数据表 sys_dict_data - * + * * @author ruoyi */ -public class SysDictData extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysDictData extends BaseEntity { private static final long serialVersionUID = 1L; - /** 字典编码 */ + /** + * 字典编码 + */ @Excel(name = "字典编码", cellType = ColumnType.NUMERIC) private Long dictCode; - /** 字典排序 */ + /** + * 字典排序 + */ @Excel(name = "字典排序", cellType = ColumnType.NUMERIC) private Long dictSort; - /** 字典标签 */ + /** + * 字典标签 + */ + @NotBlank(message = "字典标签不能为空") + @Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符") @Excel(name = "字典标签") private String dictLabel; - /** 字典键值 */ + /** + * 字典键值 + */ + @NotBlank(message = "字典键值不能为空") + @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符") @Excel(name = "字典键值") private String dictValue; - /** 字典类型 */ + /** + * 字典类型 + */ + @NotBlank(message = "字典类型不能为空") + @Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符") @Excel(name = "字典类型") private String dictType; - /** 样式属性(其他样式扩展) */ + /** + * 样式属性(其他样式扩展) + */ + @Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符") private String cssClass; - /** 表格字典样式 */ + /** + * 表格字典样式 + */ private String listClass; - /** 是否默认(Y是 N否) */ + /** + * 是否默认(Y是 N否) + */ @Excel(name = "是否默认", readConverterExp = "Y=是,N=否") private String isDefault; - /** 状态(0正常 1停用) */ + /** + * 状态(0正常 1停用) + */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") private String status; - public Long getDictCode() - { - return dictCode; - } - - public void setDictCode(Long dictCode) - { - this.dictCode = dictCode; - } - - public Long getDictSort() - { - return dictSort; - } - - public void setDictSort(Long dictSort) - { - this.dictSort = dictSort; - } - - @NotBlank(message = "字典标签不能为空") - @Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符") - public String getDictLabel() - { - return dictLabel; - } - - public void setDictLabel(String dictLabel) - { - this.dictLabel = dictLabel; - } - - @NotBlank(message = "字典键值不能为空") - @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符") - public String getDictValue() - { - return dictValue; - } - - public void setDictValue(String dictValue) - { - this.dictValue = dictValue; - } - - @NotBlank(message = "字典类型不能为空") - @Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符") - public String getDictType() - { - return dictType; - } - - public void setDictType(String dictType) - { - this.dictType = dictType; - } - - @Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符") - public String getCssClass() - { - return cssClass; - } - - public void setCssClass(String cssClass) - { - this.cssClass = cssClass; - } - - public String getListClass() - { - return listClass; - } - - public void setListClass(String listClass) - { - this.listClass = listClass; - } - - public boolean getDefault() - { + public boolean getDefault() { return UserConstants.YES.equals(this.isDefault) ? true : false; } - public String getIsDefault() - { - return isDefault; - } - - public void setIsDefault(String isDefault) - { - this.isDefault = isDefault; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("dictCode", getDictCode()) - .append("dictSort", getDictSort()) - .append("dictLabel", getDictLabel()) - .append("dictValue", getDictValue()) - .append("dictType", getDictType()) - .append("cssClass", getCssClass()) - .append("listClass", getListClass()) - .append("isDefault", getIsDefault()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictType.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictType.java index d121388d..bd9fd4e9 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictType.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictType.java @@ -2,6 +2,9 @@ package com.ruoyi.system.domain; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; + +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -10,85 +13,41 @@ import com.ruoyi.common.core.web.domain.BaseEntity; /** * 字典类型表 sys_dict_type - * + * * @author ruoyi */ -public class SysDictType extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysDictType extends BaseEntity { private static final long serialVersionUID = 1L; - /** 字典主键 */ + /** + * 字典主键 + */ @Excel(name = "字典主键", cellType = ColumnType.NUMERIC) private Long dictId; - /** 字典名称 */ + /** + * 字典名称 + */ + @NotBlank(message = "字典名称不能为空") + @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符") @Excel(name = "字典名称") private String dictName; - /** 字典类型 */ + /** + * 字典类型 + */ + @NotBlank(message = "字典类型不能为空") + @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符") @Excel(name = "字典类型") private String dictType; - /** 状态(0正常 1停用) */ + /** + * 状态(0正常 1停用) + */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") private String status; - public Long getDictId() - { - return dictId; - } - - public void setDictId(Long dictId) - { - this.dictId = dictId; - } - - @NotBlank(message = "字典名称不能为空") - @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符") - public String getDictName() - { - return dictName; - } - - public void setDictName(String dictName) - { - this.dictName = dictName; - } - - @NotBlank(message = "字典类型不能为空") - @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符") - public String getDictType() - { - return dictType; - } - - public void setDictType(String dictType) - { - this.dictType = dictType; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("dictId", getDictId()) - .append("dictName", getDictName()) - .append("dictType", getDictType()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java index 32d6f1f6..a2713857 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java @@ -1,102 +1,60 @@ package com.ruoyi.system.domain; import java.util.Date; + import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.core.annotation.Excel; import com.ruoyi.common.core.annotation.Excel.ColumnType; import com.ruoyi.common.core.web.domain.BaseEntity; +import lombok.*; +import lombok.experimental.Accessors; /** * 系统访问记录表 sys_logininfor - * + * * @author ruoyi */ -public class SysLogininfor extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysLogininfor extends BaseEntity { private static final long serialVersionUID = 1L; - /** ID */ + /** + * ID + */ @Excel(name = "序号", cellType = ColumnType.NUMERIC) private Long infoId; - /** 用户账号 */ + /** + * 用户账号 + */ @Excel(name = "用户账号") private String userName; - /** 状态 0成功 1失败 */ + /** + * 状态 0成功 1失败 + */ @Excel(name = "状态", readConverterExp = "0=成功,1=失败") private String status; - /** 地址 */ + /** + * 地址 + */ @Excel(name = "地址") private String ipaddr; - /** 描述 */ + /** + * 描述 + */ @Excel(name = "描述") private String msg; - /** 访问时间 */ + /** + * 访问时间 + */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date accessTime; - public Long getInfoId() - { - return infoId; - } - - public void setInfoId(Long infoId) - { - this.infoId = infoId; - } - - public String getUserName() - { - return userName; - } - - public void setUserName(String userName) - { - this.userName = userName; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - - public String getIpaddr() - { - return ipaddr; - } - - public void setIpaddr(String ipaddr) - { - this.ipaddr = ipaddr; - } - - public String getMsg() - { - return msg; - } - - public void setMsg(String msg) - { - this.msg = msg; - } - - public Date getAccessTime() - { - return accessTime; - } - - public void setAccessTime(Date accessTime) - { - this.accessTime = accessTime; - } } \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysMenu.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysMenu.java index 9dc62dfd..39b42e7e 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysMenu.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysMenu.java @@ -4,6 +4,9 @@ import java.util.ArrayList; import java.util.List; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; + +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -11,236 +14,95 @@ import com.ruoyi.common.core.web.domain.BaseEntity; /** * 菜单权限表 sys_menu - * + * * @author ruoyi */ -public class SysMenu extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysMenu extends BaseEntity { private static final long serialVersionUID = 1L; - /** 菜单ID */ + /** + * 菜单ID + */ private Long menuId; - /** 菜单名称 */ - private String menuName; - - /** 父菜单名称 */ - private String parentName; - - /** 父菜单ID */ - private Long parentId; - - /** 显示顺序 */ - private String orderNum; - - /** 路由地址 */ - private String path; - - /** 组件路径 */ - private String component; - - /** 是否为外链(0是 1否) */ - private String isFrame; - - /** 是否缓存(0缓存 1不缓存) */ - private String isCache; - - /** 类型(M目录 C菜单 F按钮) */ - private String menuType; - - /** 显示状态(0显示 1隐藏) */ - private String visible; - - /** 菜单状态(0显示 1隐藏) */ - private String status; - - /** 权限字符串 */ - private String perms; - - /** 菜单图标 */ - private String icon; - - /** 子菜单 */ - private List children = new ArrayList(); - - public Long getMenuId() - { - return menuId; - } - - public void setMenuId(Long menuId) - { - this.menuId = menuId; - } - + /** + * 菜单名称 + */ @NotBlank(message = "菜单名称不能为空") @Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符") - public String getMenuName() - { - return menuName; - } + private String menuName; - public void setMenuName(String menuName) - { - this.menuName = menuName; - } + /** + * 父菜单名称 + */ + private String parentName; - public String getParentName() - { - return parentName; - } - - public void setParentName(String parentName) - { - this.parentName = parentName; - } - - public Long getParentId() - { - return parentId; - } - - public void setParentId(Long parentId) - { - this.parentId = parentId; - } + /** + * 父菜单ID + */ + private Long parentId; + /** + * 显示顺序 + */ @NotBlank(message = "显示顺序不能为空") - public String getOrderNum() - { - return orderNum; - } - - public void setOrderNum(String orderNum) - { - this.orderNum = orderNum; - } + private String orderNum; + /** + * 路由地址 + */ @Size(min = 0, max = 200, message = "路由地址不能超过200个字符") - public String getPath() - { - return path; - } - - public void setPath(String path) - { - this.path = path; - } + private String path; + /** + * 组件路径 + */ @Size(min = 0, max = 200, message = "组件路径不能超过255个字符") - public String getComponent() - { - return component; - } + private String component; - public void setComponent(String component) - { - this.component = component; - } + /** + * 是否为外链(0是 1否) + */ + private String isFrame; - public String getIsFrame() - { - return isFrame; - } - - public void setIsFrame(String isFrame) - { - this.isFrame = isFrame; - } - - public String getIsCache() - { - return isCache; - } - - public void setIsCache(String isCache) - { - this.isCache = isCache; - } + /** + * 是否缓存(0缓存 1不缓存) + */ + private String isCache; + /** + * 类型(M目录 C菜单 F按钮) + */ @NotBlank(message = "菜单类型不能为空") - public String getMenuType() - { - return menuType; - } + private String menuType; - public void setMenuType(String menuType) - { - this.menuType = menuType; - } + /** + * 显示状态(0显示 1隐藏) + */ + private String visible; - public String getVisible() - { - return visible; - } - - public void setVisible(String visible) - { - this.visible = visible; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } + /** + * 菜单状态(0显示 1隐藏) + */ + private String status; + /** + * 权限字符串 + */ @Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符") - public String getPerms() - { - return perms; - } + private String perms; - public void setPerms(String perms) - { - this.perms = perms; - } + /** + * 菜单图标 + */ + private String icon; - public String getIcon() - { - return icon; - } + /** + * 子菜单 + */ + private List children = new ArrayList(); - public void setIcon(String icon) - { - this.icon = icon; - } - - public List getChildren() - { - return children; - } - - public void setChildren(List children) - { - this.children = children; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("menuId", getMenuId()) - .append("menuName", getMenuName()) - .append("parentId", getParentId()) - .append("orderNum", getOrderNum()) - .append("path", getPath()) - .append("component", getComponent()) - .append("isFrame", getIsFrame()) - .append("IsCache", getIsCache()) - .append("menuType", getMenuType()) - .append("visible", getVisible()) - .append("status ", getStatus()) - .append("perms", getPerms()) - .append("icon", getIcon()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java index 4e1c94c2..994f1bb5 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java @@ -2,6 +2,9 @@ package com.ruoyi.system.domain; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; + +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -9,93 +12,40 @@ import com.ruoyi.common.core.web.domain.BaseEntity; /** * 通知公告表 sys_notice - * + * * @author ruoyi */ -public class SysNotice extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysNotice extends BaseEntity { private static final long serialVersionUID = 1L; - /** 公告ID */ + /** + * 公告ID + */ private Long noticeId; - /** 公告标题 */ - private String noticeTitle; - - /** 公告类型(1通知 2公告) */ - private String noticeType; - - /** 公告内容 */ - private String noticeContent; - - /** 公告状态(0正常 1关闭) */ - private String status; - - public Long getNoticeId() - { - return noticeId; - } - - public void setNoticeId(Long noticeId) - { - this.noticeId = noticeId; - } - - public void setNoticeTitle(String noticeTitle) - { - this.noticeTitle = noticeTitle; - } - + /** + * 公告标题 + */ @NotBlank(message = "公告标题不能为空") @Size(min = 0, max = 50, message = "公告标题不能超过50个字符") - public String getNoticeTitle() - { - return noticeTitle; - } + private String noticeTitle; - public void setNoticeType(String noticeType) - { - this.noticeType = noticeType; - } + /** + * 公告类型(1通知 2公告) + */ + private String noticeType; - public String getNoticeType() - { - return noticeType; - } + /** + * 公告内容 + */ + private String noticeContent; - public void setNoticeContent(String noticeContent) - { - this.noticeContent = noticeContent; - } + /** + * 公告状态(0正常 1关闭) + */ + private String status; - public String getNoticeContent() - { - return noticeContent; - } - - public void setStatus(String status) - { - this.status = status; - } - - public String getStatus() - { - return status; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("noticeId", getNoticeId()) - .append("noticeTitle", getNoticeTitle()) - .append("noticeType", getNoticeType()) - .append("noticeContent", getNoticeContent()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java index b5a1e9d3..84e3966e 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java @@ -2,6 +2,9 @@ package com.ruoyi.system.domain; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; + +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -10,114 +13,53 @@ import com.ruoyi.common.core.web.domain.BaseEntity; /** * 岗位表 sys_post - * + * * @author ruoyi */ -public class SysPost extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysPost extends BaseEntity { private static final long serialVersionUID = 1L; - /** 岗位序号 */ + /** + * 岗位序号 + */ @Excel(name = "岗位序号", cellType = ColumnType.NUMERIC) private Long postId; - /** 岗位编码 */ + /** + * 岗位编码 + */ + @NotBlank(message = "岗位编码不能为空") + @Size(min = 0, max = 64, message = "岗位编码长度不能超过64个字符") @Excel(name = "岗位编码") private String postCode; - /** 岗位名称 */ + /** + * 岗位名称 + */ + @NotBlank(message = "岗位名称不能为空") + @Size(min = 0, max = 50, message = "岗位名称长度不能超过50个字符") @Excel(name = "岗位名称") private String postName; - /** 岗位排序 */ + /** + * 岗位排序 + */ + @NotBlank(message = "显示顺序不能为空") @Excel(name = "岗位排序") private String postSort; - /** 状态(0正常 1停用) */ + /** + * 状态(0正常 1停用) + */ @Excel(name = "状态", readConverterExp = "0=正常,1=停用") private String status; - /** 用户是否存在此岗位标识 默认不存在 */ + /** + * 用户是否存在此岗位标识 默认不存在 + */ private boolean flag = false; - public Long getPostId() - { - return postId; - } - - public void setPostId(Long postId) - { - this.postId = postId; - } - - @NotBlank(message = "岗位编码不能为空") - @Size(min = 0, max = 64, message = "岗位编码长度不能超过64个字符") - public String getPostCode() - { - return postCode; - } - - public void setPostCode(String postCode) - { - this.postCode = postCode; - } - - @NotBlank(message = "岗位名称不能为空") - @Size(min = 0, max = 50, message = "岗位名称长度不能超过50个字符") - public String getPostName() - { - return postName; - } - - public void setPostName(String postName) - { - this.postName = postName; - } - - @NotBlank(message = "显示顺序不能为空") - public String getPostSort() - { - return postSort; - } - - public void setPostSort(String postSort) - { - this.postSort = postSort; - } - - public String getStatus() - { - return status; - } - - public void setStatus(String status) - { - this.status = status; - } - - public boolean isFlag() - { - return flag; - } - - public void setFlag(boolean flag) - { - this.flag = flag; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("postId", getPostId()) - .append("postCode", getPostCode()) - .append("postName", getPostName()) - .append("postSort", getPostSort()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleDept.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleDept.java index 8ed8e473..204b1be8 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleDept.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleDept.java @@ -1,46 +1,28 @@ package com.ruoyi.system.domain; +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; /** * 角色和部门关联 sys_role_dept - * + * * @author ruoyi */ -public class SysRoleDept -{ - /** 角色ID */ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysRoleDept { + + /** + * 角色ID + */ private Long roleId; - - /** 部门ID */ + + /** + * 部门ID + */ private Long deptId; - public Long getRoleId() - { - return roleId; - } - - public void setRoleId(Long roleId) - { - this.roleId = roleId; - } - - public Long getDeptId() - { - return deptId; - } - - public void setDeptId(Long deptId) - { - this.deptId = deptId; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("roleId", getRoleId()) - .append("deptId", getDeptId()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleMenu.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleMenu.java index 59d28699..bd560af8 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleMenu.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleMenu.java @@ -1,46 +1,28 @@ package com.ruoyi.system.domain; +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; /** * 角色和菜单关联 sys_role_menu - * + * * @author ruoyi */ -public class SysRoleMenu -{ - /** 角色ID */ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysRoleMenu { + + /** + * 角色ID + */ private Long roleId; - - /** 菜单ID */ + + /** + * 菜单ID + */ private Long menuId; - public Long getRoleId() - { - return roleId; - } - - public void setRoleId(Long roleId) - { - this.roleId = roleId; - } - - public Long getMenuId() - { - return menuId; - } - - public void setMenuId(Long menuId) - { - this.menuId = menuId; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("roleId", getRoleId()) - .append("menuId", getMenuId()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserOnline.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserOnline.java index d9c8df01..9d7a2123 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserOnline.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserOnline.java @@ -1,100 +1,51 @@ package com.ruoyi.system.domain; +import lombok.*; +import lombok.experimental.Accessors; + /** * 当前在线会话 - * + * * @author ruoyi */ -public class SysUserOnline -{ - /** 会话编号 */ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysUserOnline { + + /** + * 会话编号 + */ private String tokenId; - /** 用户名称 */ + /** + * 用户名称 + */ private String userName; - /** 登录IP地址 */ + /** + * 登录IP地址 + */ private String ipaddr; - /** 登录地址 */ + /** + * 登录地址 + */ private String loginLocation; - /** 浏览器类型 */ + /** + * 浏览器类型 + */ private String browser; - /** 操作系统 */ + /** + * 操作系统 + */ private String os; - /** 登录时间 */ + /** + * 登录时间 + */ private Long loginTime; - public String getTokenId() - { - return tokenId; - } - - public void setTokenId(String tokenId) - { - this.tokenId = tokenId; - } - - public String getUserName() - { - return userName; - } - - public void setUserName(String userName) - { - this.userName = userName; - } - - public String getIpaddr() - { - return ipaddr; - } - - public void setIpaddr(String ipaddr) - { - this.ipaddr = ipaddr; - } - - public String getLoginLocation() - { - return loginLocation; - } - - public void setLoginLocation(String loginLocation) - { - this.loginLocation = loginLocation; - } - - public String getBrowser() - { - return browser; - } - - public void setBrowser(String browser) - { - this.browser = browser; - } - - public String getOs() - { - return os; - } - - public void setOs(String os) - { - this.os = os; - } - - public Long getLoginTime() - { - return loginTime; - } - - public void setLoginTime(Long loginTime) - { - this.loginTime = loginTime; - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserPost.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserPost.java index 07ceb85c..c65096d3 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserPost.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserPost.java @@ -1,46 +1,28 @@ package com.ruoyi.system.domain; +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; /** * 用户和岗位关联 sys_user_post - * + * * @author ruoyi */ -public class SysUserPost -{ - /** 用户ID */ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysUserPost { + + /** + * 用户ID + */ private Long userId; - - /** 岗位ID */ + + /** + * 岗位ID + */ private Long postId; - public Long getUserId() - { - return userId; - } - - public void setUserId(Long userId) - { - this.userId = userId; - } - - public Long getPostId() - { - return postId; - } - - public void setPostId(Long postId) - { - this.postId = postId; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("userId", getUserId()) - .append("postId", getPostId()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserRole.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserRole.java index ce2af2bd..583c9ad4 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserRole.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserRole.java @@ -1,46 +1,28 @@ package com.ruoyi.system.domain; +import lombok.*; +import lombok.experimental.Accessors; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; /** * 用户和角色关联 sys_user_role - * + * * @author ruoyi */ -public class SysUserRole -{ - /** 用户ID */ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class SysUserRole { + + /** + * 用户ID + */ private Long userId; - - /** 角色ID */ + + /** + * 角色ID + */ private Long roleId; - public Long getUserId() - { - return userId; - } - - public void setUserId(Long userId) - { - this.userId = userId; - } - - public Long getRoleId() - { - return roleId; - } - - public void setRoleId(Long roleId) - { - this.roleId = roleId; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("userId", getUserId()) - .append("roleId", getRoleId()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MetaVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MetaVo.java index ec042087..2d4011d2 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MetaVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MetaVo.java @@ -1,12 +1,18 @@ package com.ruoyi.system.domain.vo; +import lombok.*; +import lombok.experimental.Accessors; + /** * 路由显示信息 - * + * * @author ruoyi */ -public class MetaVo -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class MetaVo { + /** * 设置该路由在侧边栏和面包屑中展示的名字 */ @@ -22,50 +28,15 @@ public class MetaVo */ private boolean noCache; - public MetaVo() - { - } - - public MetaVo(String title, String icon) - { + public MetaVo(String title, String icon) { this.title = title; this.icon = icon; } - public MetaVo(String title, String icon, boolean noCache) - { + public MetaVo(String title, String icon, boolean noCache) { this.title = title; this.icon = icon; this.noCache = noCache; } - public boolean isNoCache() - { - return noCache; - } - - public void setNoCache(boolean noCache) - { - this.noCache = noCache; - } - - public String getTitle() - { - return title; - } - - public void setTitle(String title) - { - this.title = title; - } - - public String getIcon() - { - return icon; - } - - public void setIcon(String icon) - { - this.icon = icon; - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java index 21ff6b59..e389b6ab 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java @@ -1,16 +1,22 @@ package com.ruoyi.system.domain.vo; import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.*; +import lombok.experimental.Accessors; + import java.util.List; /** * 路由配置信息 - * + * * @author ruoyi */ +@Data +@NoArgsConstructor +@Accessors(chain = true) @JsonInclude(JsonInclude.Include.NON_EMPTY) -public class RouterVo -{ +public class RouterVo { + /** * 路由名字 */ @@ -51,83 +57,4 @@ public class RouterVo */ private List children; - public String getName() - { - return name; - } - - public void setName(String name) - { - this.name = name; - } - - public String getPath() - { - return path; - } - - public void setPath(String path) - { - this.path = path; - } - - public boolean getHidden() - { - return hidden; - } - - public void setHidden(boolean hidden) - { - this.hidden = hidden; - } - - public String getRedirect() - { - return redirect; - } - - public void setRedirect(String redirect) - { - this.redirect = redirect; - } - - public String getComponent() - { - return component; - } - - public void setComponent(String component) - { - this.component = component; - } - - public Boolean getAlwaysShow() - { - return alwaysShow; - } - - public void setAlwaysShow(Boolean alwaysShow) - { - this.alwaysShow = alwaysShow; - } - - public MetaVo getMeta() - { - return meta; - } - - public void setMeta(MetaVo meta) - { - this.meta = meta; - } - - public List getChildren() - { - return children; - } - - public void setChildren(List children) - { - this.children = children; - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TreeSelect.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TreeSelect.java index 9dc14268..ec8e387b 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TreeSelect.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/TreeSelect.java @@ -3,75 +3,50 @@ package com.ruoyi.system.domain.vo; import java.io.Serializable; import java.util.List; import java.util.stream.Collectors; + import com.fasterxml.jackson.annotation.JsonInclude; import com.ruoyi.system.api.domain.SysDept; import com.ruoyi.system.domain.SysMenu; +import lombok.*; +import lombok.experimental.Accessors; /** * Treeselect树结构实体类 - * + * * @author ruoyi */ -public class TreeSelect implements Serializable -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +public class TreeSelect implements Serializable { private static final long serialVersionUID = 1L; - /** 节点ID */ + /** + * 节点ID + */ private Long id; - /** 节点名称 */ + /** + * 节点名称 + */ private String label; - /** 子节点 */ + /** + * 子节点 + */ @JsonInclude(JsonInclude.Include.NON_EMPTY) private List children; - public TreeSelect() - { - - } - - public TreeSelect(SysDept dept) - { + public TreeSelect(SysDept dept) { this.id = dept.getDeptId(); this.label = dept.getDeptName(); this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); } - public TreeSelect(SysMenu menu) - { + public TreeSelect(SysMenu menu) { this.id = menu.getMenuId(); this.label = menu.getMenuName(); this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); } - public Long getId() - { - return id; - } - - public void setId(Long id) - { - this.id = id; - } - - public String getLabel() - { - return label; - } - - public void setLabel(String label) - { - this.label = label; - } - - public List getChildren() - { - return children; - } - - public void setChildren(List children) - { - this.children = children; - } }