From c4e17ff8472fd9f8123e86b593b2968ad5936b15 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期一, 01 十一月 2021 13:49:11 +0800 Subject: [PATCH] fix 修复 xxl-job-admin 部署问题 --- ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java | 370 ++++++++++++++++++++-------------------------------- 1 files changed, 144 insertions(+), 226 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java index f28a063..1d186db 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java @@ -1,226 +1,144 @@ -package com.ruoyi.common.core.domain.entity; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.annotation.Excel.ColumnType; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 瑙掕壊琛� sys_role - * - * @author ruoyi - */ -public class SysRole extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 瑙掕壊ID */ - @Excel(name = "瑙掕壊搴忓彿", cellType = ColumnType.NUMERIC) - private Long roleId; - - /** 瑙掕壊鍚嶇О */ - @Excel(name = "瑙掕壊鍚嶇О") - private String roleName; - - /** 瑙掕壊鏉冮檺 */ - @Excel(name = "瑙掕壊鏉冮檺") - private String roleKey; - - /** 瑙掕壊鎺掑簭 */ - @Excel(name = "瑙掕壊鎺掑簭") - private String roleSort; - - /** 鏁版嵁鑼冨洿锛�1锛氭墍鏈夋暟鎹潈闄愶紱2锛氳嚜瀹氫箟鏁版嵁鏉冮檺锛�3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺锛�4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶紱5锛氫粎鏈汉鏁版嵁鏉冮檺锛� */ - @Excel(name = "鏁版嵁鑼冨洿", readConverterExp = "1=鎵�鏈夋暟鎹潈闄�,2=鑷畾涔夋暟鎹潈闄�,3=鏈儴闂ㄦ暟鎹潈闄�,4=鏈儴闂ㄥ強浠ヤ笅鏁版嵁鏉冮檺,5=浠呮湰浜烘暟鎹潈闄�") - private String dataScope; - - /** 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙 0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀猴級 */ - private boolean menuCheckStrictly; - - /** 閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀� 锛� */ - private boolean deptCheckStrictly; - - /** 瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛� */ - @Excel(name = "瑙掕壊鐘舵��", readConverterExp = "0=姝e父,1=鍋滅敤") - private String status; - - /** 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� */ - private String delFlag; - - /** 鐢ㄦ埛鏄惁瀛樺湪姝よ鑹叉爣璇� 榛樿涓嶅瓨鍦� */ - private boolean flag = false; - - /** 鑿滃崟缁� */ - private Long[] menuIds; - - /** 閮ㄩ棬缁勶紙鏁版嵁鏉冮檺锛� */ - private Long[] deptIds; - - public SysRole() - { - - } - - public SysRole(Long roleId) - { - this.roleId = roleId; - } - - public Long getRoleId() - { - return roleId; - } - - public void setRoleId(Long roleId) - { - this.roleId = roleId; - } - - public boolean isAdmin() - { - return isAdmin(this.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; - } - - @Override - 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(); - } -} +package com.ruoyi.common.core.domain.entity; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import com.ruoyi.common.annotation.ExcelDictFormat; +import com.ruoyi.common.convert.ExcelDictConvert; +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +/** + * 瑙掕壊琛� sys_role + * + * @author Lion Li + */ + +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@Accessors(chain = true) +@TableName("sys_role") +@ExcelIgnoreUnannotated +public class SysRole extends BaseEntity { + + /** + * 瑙掕壊ID + */ + @ApiModelProperty(value = "瑙掕壊ID") + @ExcelProperty(value = "瑙掕壊搴忓彿") + @TableId(value = "role_id") + private Long roleId; + + /** + * 瑙掕壊鍚嶇О + */ + @ApiModelProperty(value = "瑙掕壊鍚嶇О") + @ExcelProperty(value = "瑙掕壊鍚嶇О") + @NotBlank(message = "瑙掕壊鍚嶇О涓嶈兘涓虹┖") + @Size(min = 0, max = 30, message = "瑙掕壊鍚嶇О闀垮害涓嶈兘瓒呰繃30涓瓧绗�") + private String roleName; + + /** + * 瑙掕壊鏉冮檺 + */ + @ApiModelProperty(value = "瑙掕壊鏉冮檺") + @ExcelProperty(value = "瑙掕壊鏉冮檺") + @NotBlank(message = "鏉冮檺瀛楃涓嶈兘涓虹┖") + @Size(min = 0, max = 100, message = "鏉冮檺瀛楃闀垮害涓嶈兘瓒呰繃100涓瓧绗�") + private String roleKey; + + /** + * 瑙掕壊鎺掑簭 + */ + @ApiModelProperty(value = "瑙掕壊鎺掑簭") + @ExcelProperty(value = "瑙掕壊鎺掑簭") + @NotBlank(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖") + private String roleSort; + + /** + * 鏁版嵁鑼冨洿锛�1锛氭墍鏈夋暟鎹潈闄愶紱2锛氳嚜瀹氫箟鏁版嵁鏉冮檺锛�3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺锛�4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶紱5锛氫粎鏈汉鏁版嵁鏉冮檺锛� + */ + @ApiModelProperty(value = "鏁版嵁鑼冨洿锛�1锛氭墍鏈夋暟鎹潈闄愶紱2锛氳嚜瀹氫箟鏁版嵁鏉冮檺锛�3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺锛�4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶紱5锛氫粎鏈汉鏁版嵁鏉冮檺锛�") + @ExcelProperty(value = "鏁版嵁鑼冨洿", converter = ExcelDictConvert.class) + @ExcelDictFormat(readConverterExp = "1=鎵�鏈夋暟鎹潈闄�,2=鑷畾涔夋暟鎹潈闄�,3=鏈儴闂ㄦ暟鎹潈闄�,4=鏈儴闂ㄥ強浠ヤ笅鏁版嵁鏉冮檺,5=浠呮湰浜烘暟鎹潈闄�") + private String dataScope; + + /** + * 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙 0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀猴級 + */ + @ApiModelProperty(value = "鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙 0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀猴級") + private boolean menuCheckStrictly; + + /** + * 閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀� 锛� + */ + @ApiModelProperty(value = "閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀� 锛�") + private boolean deptCheckStrictly; + + /** + * 瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛� + */ + @ApiModelProperty(value = "瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�") + @ExcelProperty(value = "瑙掕壊鐘舵��", converter = ExcelDictConvert.class) + @ExcelDictFormat(dictType = "sys_common_status") + private String status; + + /** + * 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� + */ + @ApiModelProperty(value = "鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�") + @TableLogic + private String delFlag; + + /** + * 澶囨敞 + */ + @ApiModelProperty(value = "澶囨敞") + private String remark; + + /** + * 鐢ㄦ埛鏄惁瀛樺湪姝よ鑹叉爣璇� 榛樿涓嶅瓨鍦� + */ + @ApiModelProperty(value = "鐢ㄦ埛鏄惁瀛樺湪姝よ鑹叉爣璇� 榛樿涓嶅瓨鍦�") + @TableField(exist = false) + private boolean flag = false; + + /** + * 鑿滃崟缁� + */ + @ApiModelProperty(value = "鑿滃崟缁�") + @TableField(exist = false) + private Long[] menuIds; + + /** + * 閮ㄩ棬缁勶紙鏁版嵁鏉冮檺锛� + */ + @ApiModelProperty(value = "閮ㄩ棬缁勶紙鏁版嵁鏉冮檺锛�") + @TableField(exist = false) + private Long[] deptIds; + + public SysRole(Long roleId) { + this.roleId = roleId; + } + + @ApiModelProperty(value = "鏄惁绠$悊鍛�") + public boolean isAdmin() { + return isAdmin(this.roleId); + } + + public static boolean isAdmin(Long roleId) { + return roleId != null && 1L == roleId; + } + +} -- Gitblit v1.9.3