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/Resource.java | 31 ++++++++++++++++++------------- 1 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/zy/system/entity/Resource.java b/src/main/java/com/zy/system/entity/Resource.java index c10a279..ab0f718 100644 --- a/src/main/java/com/zy/system/entity/Resource.java +++ b/src/main/java/com/zy/system/entity/Resource.java @@ -4,9 +4,9 @@ import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.enums.IdType; -import com.zy.system.service.ResourceService; import com.core.common.Cools; import com.core.common.SpringUtils; +import com.zy.system.service.ResourceService; import java.io.Serializable; @@ -38,7 +38,7 @@ private Long resourceId; /** - * 鑿滃崟绛夌骇 1: 涓�绾ц彍鍗� 2: 浜岀骇鑿滃崟 + * 鑿滃崟绛夌骇 1: 涓�绾ц彍鍗� 2: 浜岀骇鑿滃崟 */ private Short level; @@ -48,13 +48,14 @@ private Integer sort; /** - * 鐘舵�� 1: 姝e父 0: 绂佺敤 + * 鐘舵�� 1: 姝e父 0: 绂佺敤 */ private Short status; - public Resource() {} + public Resource() { + } - public Resource(String code,String name,Long resourceId,Short level,Integer sort,Short status) { + public Resource(String code, String name, Long resourceId, Short level, Integer sort, Short status) { this.code = code; this.name = name; this.resourceId = resourceId; @@ -100,10 +101,10 @@ return resourceId; } - public String getResourceName(){ + public String getResourceName() { ResourceService service = SpringUtils.getBean(ResourceService.class); Resource resource = service.selectById(this.resourceId); - if (!Cools.isEmpty(resource)){ + if (!Cools.isEmpty(resource)) { return resource.getName(); } return null; @@ -117,9 +118,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: @@ -147,9 +150,11 @@ return status; } - public String getStatus$(){ - if (null == this.status){ return null; } - switch (this.status){ + public String getStatus$() { + if (null == this.status) { + return null; + } + switch (this.status) { case 1: return "姝e父"; case 0: -- Gitblit v1.9.1