From bb28c2f09f7fa36b8b80f9d19f23631623b80d1c Mon Sep 17 00:00:00 2001
From: pang.jiabao <pang_jiabao@163.com>
Date: 星期六, 01 三月 2025 16:59:46 +0800
Subject: [PATCH] #
---
zy-asrs-common/src/main/java/com/zy/asrs/common/sys/entity/Role.java | 188 +++++++++++++++++++++++-----------------------
1 files changed, 94 insertions(+), 94 deletions(-)
diff --git a/zy-asrs-common/src/main/java/com/zy/asrs/common/sys/entity/Role.java b/zy-asrs-common/src/main/java/com/zy/asrs/common/sys/entity/Role.java
index ebe9b6d..2b79d39 100644
--- a/zy-asrs-common/src/main/java/com/zy/asrs/common/sys/entity/Role.java
+++ b/zy-asrs-common/src/main/java/com/zy/asrs/common/sys/entity/Role.java
@@ -1,94 +1,94 @@
-package com.zy.asrs.common.sys.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.zy.asrs.common.sys.service.RoleService;
-import com.zy.asrs.framework.common.Cools;
-import com.zy.asrs.framework.common.SpringUtils;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-@TableName("sys_role")
-public class Role implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * 缂栧彿
- */
- @ApiModelProperty(value= "缂栧彿")
- @TableId(value = "id", type = IdType.AUTO)
- private Long id;
-
- /**
- * 缂栫爜
- */
- @ApiModelProperty(value= "缂栫爜")
- private String code;
-
- /**
- * 鍚嶇О
- */
- @ApiModelProperty(value= "鍚嶇О")
- private String name;
-
- /**
- * 涓婄骇
- */
- @ApiModelProperty(value= "涓婄骇")
- private Long leader;
-
- /**
- * 瑙掕壊绛夌骇 1: 涓�绾� 2: 浜岀骇 3: 涓夌骇 4: 鍥涚骇 5: 浜旂骇
- */
- @ApiModelProperty(value= "瑙掕壊绛夌骇 1: 涓�绾� 2: 浜岀骇 3: 涓夌骇 4: 鍥涚骇 5: 浜旂骇 ")
- private Short level;
-
- public Role() {}
-
- public Role(String code,String name,Long leader,Short level) {
- this.code = code;
- this.name = name;
- this.leader = leader;
- this.level = level;
- }
-
-// Role role = new Role(
-// null, // 缂栫爜[闈炵┖]
-// null, // 鍚嶇О[闈炵┖]
-// null, // 涓婄骇
-// null // 瑙掕壊绛夌骇
-// );
-
- public String getLeader$(){
- RoleService service = SpringUtils.getBean(RoleService.class);
- Role role = service.getById(this.leader);
- if (!Cools.isEmpty(role)){
- return String.valueOf(role.getName());
- }
- return null;
- }
-
- public String getLevel$(){
- if (null == this.level){ return null; }
- switch (this.level){
- case 1:
- return "涓�绾�";
- case 2:
- return "浜岀骇";
- case 3:
- return "涓夌骇";
- case 4:
- return "鍥涚骇";
- case 5:
- return "浜旂骇";
- default:
- return String.valueOf(this.level);
- }
- }
-
-}
+package com.zy.asrs.common.sys.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.zy.asrs.common.sys.service.RoleService;
+import com.zy.asrs.framework.common.Cools;
+import com.zy.asrs.framework.common.SpringUtils;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+@TableName("sys_role")
+public class Role implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 缂栧彿
+ */
+ @ApiModelProperty(value= "缂栧彿")
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 缂栫爜
+ */
+ @ApiModelProperty(value= "缂栫爜")
+ private String code;
+
+ /**
+ * 鍚嶇О
+ */
+ @ApiModelProperty(value= "鍚嶇О")
+ private String name;
+
+ /**
+ * 涓婄骇
+ */
+ @ApiModelProperty(value= "涓婄骇")
+ private Long leader;
+
+ /**
+ * 瑙掕壊绛夌骇 1: 涓�绾� 2: 浜岀骇 3: 涓夌骇 4: 鍥涚骇 5: 浜旂骇
+ */
+ @ApiModelProperty(value= "瑙掕壊绛夌骇 1: 涓�绾� 2: 浜岀骇 3: 涓夌骇 4: 鍥涚骇 5: 浜旂骇 ")
+ private Short level;
+
+ public Role() {}
+
+ public Role(String code,String name,Long leader,Short level) {
+ this.code = code;
+ this.name = name;
+ this.leader = leader;
+ this.level = level;
+ }
+
+// Role role = new Role(
+// null, // 缂栫爜[闈炵┖]
+// null, // 鍚嶇О[闈炵┖]
+// null, // 涓婄骇
+// null // 瑙掕壊绛夌骇
+// );
+
+ public String getLeader$(){
+ RoleService service = SpringUtils.getBean(RoleService.class);
+ Role role = service.getById(this.leader);
+ if (!Cools.isEmpty(role)){
+ return String.valueOf(role.getName());
+ }
+ return null;
+ }
+
+ public String getLevel$(){
+ if (null == this.level){ return null; }
+ switch (this.level){
+ case 1:
+ return "涓�绾�";
+ case 2:
+ return "浜岀骇";
+ case 3:
+ return "涓夌骇";
+ case 4:
+ return "鍥涚骇";
+ case 5:
+ return "浜旂骇";
+ default:
+ return String.valueOf(this.level);
+ }
+ }
+
+}
--
Gitblit v1.9.1