From aed8969498eb8fc39f8b461104f05009fe8533e1 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期日, 26 九月 2021 15:37:40 +0800
Subject: [PATCH] remove 移除无用配置类
---
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java | 189 +++++++++++++++++++++++++++++------------------
1 files changed, 116 insertions(+), 73 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 4ada2c2..5163524 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,20 +1,24 @@
package com.ruoyi.common.core.domain.entity;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.annotation.Excel.ColumnType;
+import com.ruoyi.common.annotation.ExcelDictFormat;
+import com.ruoyi.common.convert.ExcelDictConvert;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
+import java.io.Serializable;
import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
/**
* 瑙掕壊琛� sys_role
- *
+ *
* @author ruoyi
*/
@@ -22,94 +26,133 @@
@NoArgsConstructor
@Accessors(chain = true)
@TableName("sys_role")
-public class SysRole
-{
- private static final long serialVersionUID = 1L;
+@ExcelIgnoreUnannotated
+public class SysRole implements Serializable {
+ private static final long serialVersionUID = 1L;
- /** 瑙掕壊ID */
- @Excel(name = "瑙掕壊搴忓彿", cellType = ColumnType.NUMERIC)
- @TableId(value = "role_id",type = IdType.AUTO)
- private Long roleId;
+ /**
+ * 瑙掕壊ID
+ */
+ @ExcelProperty(value = "瑙掕壊搴忓彿")
+ @TableId(value = "role_id", type = IdType.AUTO)
+ private Long roleId;
- /** 瑙掕壊鍚嶇О */
- @Excel(name = "瑙掕壊鍚嶇О")
- @NotBlank(message = "瑙掕壊鍚嶇О涓嶈兘涓虹┖")
- @Size(min = 0, max = 30, message = "瑙掕壊鍚嶇О闀垮害涓嶈兘瓒呰繃30涓瓧绗�")
- private String roleName;
+ /**
+ * 瑙掕壊鍚嶇О
+ */
+ @ExcelProperty(value = "瑙掕壊鍚嶇О")
+ @NotBlank(message = "瑙掕壊鍚嶇О涓嶈兘涓虹┖")
+ @Size(min = 0, max = 30, message = "瑙掕壊鍚嶇О闀垮害涓嶈兘瓒呰繃30涓瓧绗�")
+ private String roleName;
- /** 瑙掕壊鏉冮檺 */
- @Excel(name = "瑙掕壊鏉冮檺")
- @NotBlank(message = "鏉冮檺瀛楃涓嶈兘涓虹┖")
- @Size(min = 0, max = 100, message = "鏉冮檺瀛楃闀垮害涓嶈兘瓒呰繃100涓瓧绗�")
- private String roleKey;
+ /**
+ * 瑙掕壊鏉冮檺
+ */
+ @ExcelProperty(value = "瑙掕壊鏉冮檺")
+ @NotBlank(message = "鏉冮檺瀛楃涓嶈兘涓虹┖")
+ @Size(min = 0, max = 100, message = "鏉冮檺瀛楃闀垮害涓嶈兘瓒呰繃100涓瓧绗�")
+ private String roleKey;
- /** 瑙掕壊鎺掑簭 */
- @Excel(name = "瑙掕壊鎺掑簭")
- @NotBlank(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
- private String roleSort;
+ /**
+ * 瑙掕壊鎺掑簭
+ */
+ @ExcelProperty(value = "瑙掕壊鎺掑簭")
+ @NotBlank(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
+ private String roleSort;
- /** 鏁版嵁鑼冨洿锛�1锛氭墍鏈夋暟鎹潈闄愶紱2锛氳嚜瀹氫箟鏁版嵁鏉冮檺锛�3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺锛�4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級 */
- @Excel(name = "鏁版嵁鑼冨洿", readConverterExp = "1=鎵�鏈夋暟鎹潈闄�,2=鑷畾涔夋暟鎹潈闄�,3=鏈儴闂ㄦ暟鎹潈闄�,4=鏈儴闂ㄥ強浠ヤ笅鏁版嵁鏉冮檺")
- private String dataScope;
+ /**
+ * 鏁版嵁鑼冨洿锛�1锛氭墍鏈夋暟鎹潈闄愶紱2锛氳嚜瀹氫箟鏁版嵁鏉冮檺锛�3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺锛�4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶紱5锛氫粎鏈汉鏁版嵁鏉冮檺锛�
+ */
+ @ExcelProperty(value = "鏁版嵁鑼冨洿", converter = ExcelDictConvert.class)
+ @ExcelDictFormat(readConverterExp = "1=鎵�鏈夋暟鎹潈闄�,2=鑷畾涔夋暟鎹潈闄�,3=鏈儴闂ㄦ暟鎹潈闄�,4=鏈儴闂ㄥ強浠ヤ笅鏁版嵁鏉冮檺,5=浠呮湰浜烘暟鎹潈闄�")
+ private String dataScope;
- /** 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙 0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀猴級 */
- private boolean menuCheckStrictly;
+ /**
+ * 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙 0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀猴級
+ */
+ private boolean menuCheckStrictly;
- /** 閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀� 锛� */
- private boolean deptCheckStrictly;
+ /**
+ * 閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀� 锛�
+ */
+ private boolean deptCheckStrictly;
- /** 瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛� */
- @Excel(name = "瑙掕壊鐘舵��", readConverterExp = "0=姝e父,1=鍋滅敤")
- private String status;
+ /**
+ * 瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�
+ */
+ @ExcelProperty(value = "瑙掕壊鐘舵��", converter = ExcelDictConvert.class)
+ @ExcelDictFormat(dictType = "sys_common_status")
+ private String status;
- /** 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� */
- @TableLogic
- private String delFlag;
+ /**
+ * 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�
+ */
+ @TableLogic
+ private String delFlag;
- /** 鍒涘缓鑰� */
- private String createBy;
+ /**
+ * 鍒涘缓鑰�
+ */
+ @TableField(fill = FieldFill.INSERT)
+ private String createBy;
- /** 鍒涘缓鏃堕棿 */
- @TableField(fill = FieldFill.INSERT)
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date createTime;
+ /**
+ * 鍒涘缓鏃堕棿
+ */
+ @TableField(fill = FieldFill.INSERT)
+ private Date createTime;
- /** 鏇存柊鑰� */
- private String updateBy;
+ /**
+ * 鏇存柊鑰�
+ */
+ @TableField(fill = FieldFill.INSERT_UPDATE)
+ private String updateBy;
- /** 鏇存柊鏃堕棿 */
- @TableField(fill = FieldFill.INSERT_UPDATE)
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date updateTime;
+ /**
+ * 鏇存柊鏃堕棿
+ */
+ @TableField(fill = FieldFill.INSERT_UPDATE)
+ private Date updateTime;
- /** 澶囨敞 */
- private String remark;
+ /**
+ * 澶囨敞
+ */
+ private String remark;
- /** 鐢ㄦ埛鏄惁瀛樺湪姝よ鑹叉爣璇� 榛樿涓嶅瓨鍦� */
- @TableField(exist = false)
- private boolean flag = false;
+ /**
+ * 璇锋眰鍙傛暟
+ */
+ @TableField(exist = false)
+ private Map<String, Object> params = new HashMap<>();
- /** 鑿滃崟缁� */
- @TableField(exist = false)
- private Long[] menuIds;
+ /**
+ * 鐢ㄦ埛鏄惁瀛樺湪姝よ鑹叉爣璇� 榛樿涓嶅瓨鍦�
+ */
+ @TableField(exist = false)
+ private boolean flag = false;
- /** 閮ㄩ棬缁勶紙鏁版嵁鏉冮檺锛� */
- @TableField(exist = false)
- private Long[] deptIds;
+ /**
+ * 鑿滃崟缁�
+ */
+ @TableField(exist = false)
+ private Long[] menuIds;
- public SysRole(Long roleId)
- {
- this.roleId = roleId;
- }
+ /**
+ * 閮ㄩ棬缁勶紙鏁版嵁鏉冮檺锛�
+ */
+ @TableField(exist = false)
+ private Long[] deptIds;
- public boolean isAdmin()
- {
- return isAdmin(this.roleId);
- }
+ public SysRole(Long roleId) {
+ this.roleId = roleId;
+ }
- public static boolean isAdmin(Long roleId)
- {
- return roleId != null && 1L == roleId;
- }
+ public boolean isAdmin() {
+ return isAdmin(this.roleId);
+ }
+
+ public static boolean isAdmin(Long roleId) {
+ return roleId != null && 1L == roleId;
+ }
}
--
Gitblit v1.9.3