From c74b878372127daae5a8af61a163ab7e0d1fbaef Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期三, 30 三月 2022 11:41:56 +0800 Subject: [PATCH] fix 修复设置角色报错问题 --- ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java | 38 ++++++++++++++++++++++++++++++++++---- 1 files changed, 34 insertions(+), 4 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 662989e..ff9275a 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 @@ -16,6 +16,7 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; /** @@ -62,8 +63,8 @@ */ @ApiModelProperty(value = "瑙掕壊鎺掑簭") @ExcelProperty(value = "瑙掕壊鎺掑簭") - @NotBlank(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖") - private String roleSort; + @NotNull(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖") + private Integer roleSort; /** * 鏁版嵁鑼冨洿锛�1锛氭墍鏈夋暟鎹潈闄愶紱2锛氳嚜瀹氫箟鏁版嵁鏉冮檺锛�3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺锛�4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶紱5锛氫粎鏈汉鏁版嵁鏉冮檺锛� @@ -77,13 +78,13 @@ * 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙 0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀猴級 */ @ApiModelProperty(value = "鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙 0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀猴級") - private boolean menuCheckStrictly; + private Integer menuCheckStrictly; /** * 閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀� 锛� */ @ApiModelProperty(value = "閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀� 锛�") - private boolean deptCheckStrictly; + private Integer deptCheckStrictly; /** * 瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛� @@ -136,4 +137,33 @@ return UserConstants.ADMIN_ID.equals(this.roleId); } + public Boolean getMenuCheckStrictly() { + if (menuCheckStrictly == null) { + return null; + } + return menuCheckStrictly == 1; + } + + public void setMenuCheckStrictly(Boolean menuCheckStrictly) { + if (menuCheckStrictly == null) { + this.menuCheckStrictly = null; + return; + } + this.menuCheckStrictly = menuCheckStrictly ? 1 : 0; + } + + public Boolean getDeptCheckStrictly() { + if (deptCheckStrictly == null) { + return null; + } + return deptCheckStrictly == 1; + } + + public void setDeptCheckStrictly(Boolean deptCheckStrictly) { + if (deptCheckStrictly == null) { + this.deptCheckStrictly = null; + return; + } + this.deptCheckStrictly = deptCheckStrictly ? 1 : 0; + } } -- Gitblit v1.9.3