update 修改角色适配 采用 get set 转换数据类型

This commit is contained in:
疯狂的狮子Li
2022-03-30 11:48:31 +08:00
parent f644709a99
commit 73eb9cc7d7
4 changed files with 39 additions and 10 deletions

View File

@@ -137,4 +137,33 @@ public class SysRole extends BaseEntity {
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;
}
}