From 82de5a307466894bbb0258f8a63a26a7bb96d80d Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期四, 16 十月 2025 09:55:35 +0800 Subject: [PATCH] 13 --- src/main/java/com/zy/system/entity/Role.java | 35 +++++++++++++++++++---------------- 1 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/zy/system/entity/Role.java b/src/main/java/com/zy/system/entity/Role.java index 86214e0..faf7c31 100644 --- a/src/main/java/com/zy/system/entity/Role.java +++ b/src/main/java/com/zy/system/entity/Role.java @@ -3,9 +3,9 @@ import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.enums.IdType; -import com.zy.system.service.RoleService; import com.core.common.Cools; import com.core.common.SpringUtils; +import com.zy.system.service.RoleService; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; @@ -18,37 +18,38 @@ /** * 缂栧彿 */ - @ApiModelProperty(value= "缂栧彿") + @ApiModelProperty(value = "缂栧彿") @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 缂栫爜 */ - @ApiModelProperty(value= "缂栫爜") + @ApiModelProperty(value = "缂栫爜") private String code; /** * 鍚嶇О */ - @ApiModelProperty(value= "鍚嶇О") + @ApiModelProperty(value = "鍚嶇О") private String name; /** * 涓婄骇 */ - @ApiModelProperty(value= "涓婄骇") + @ApiModelProperty(value = "涓婄骇") private Long leader; /** - * 瑙掕壊绛夌骇 1: 涓�绾� 2: 浜岀骇 3: 涓夌骇 4: 鍥涚骇 5: 浜旂骇 + * 瑙掕壊绛夌骇 1: 涓�绾� 2: 浜岀骇 3: 涓夌骇 4: 鍥涚骇 5: 浜旂骇 */ - @ApiModelProperty(value= "瑙掕壊绛夌骇 1: 涓�绾� 2: 浜岀骇 3: 涓夌骇 4: 鍥涚骇 5: 浜旂骇 ") + @ApiModelProperty(value = "瑙掕壊绛夌骇 1: 涓�绾� 2: 浜岀骇 3: 涓夌骇 4: 鍥涚骇 5: 浜旂骇 ") private Short level; - public Role() {} + public Role() { + } - public Role(String code,String name,Long leader,Short level) { + public Role(String code, String name, Long leader, Short level) { this.code = code; this.name = name; this.leader = leader; @@ -90,19 +91,19 @@ return leader; } - public String getLeader$(){ + public String getLeader$() { RoleService service = SpringUtils.getBean(RoleService.class); Role role = service.selectById(this.leader); - if (!Cools.isEmpty(role)){ + if (!Cools.isEmpty(role)) { return String.valueOf(role.getName()); } return null; } - public String getLeaderCode(){ + public String getLeaderCode() { RoleService service = SpringUtils.getBean(RoleService.class); Role role = service.selectById(this.leader); - if (!Cools.isEmpty(role)){ + if (!Cools.isEmpty(role)) { return String.valueOf(role.getCode()); } return null; @@ -116,9 +117,11 @@ return level; } - public String getLevel$(){ - if (null == this.level){ return null; } - switch (this.level){ + public String getLevel$() { + if (null == this.level) { + return null; + } + switch (this.level) { case 1: return "涓�绾�"; case 2: -- Gitblit v1.9.1