From 55773cf8183b9ddb45a4321de3468d727cea88fd Mon Sep 17 00:00:00 2001
From: zc <zc@123>
Date: 星期一, 21 四月 2025 17:18:00 +0800
Subject: [PATCH] qw

---
 src/main/java/com/zy/system/entity/Role.java |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/system/entity/Role.java b/src/main/java/com/zy/system/entity/Role.java
index 7f31512..86214e0 100644
--- a/src/main/java/com/zy/system/entity/Role.java
+++ b/src/main/java/com/zy/system/entity/Role.java
@@ -99,6 +99,15 @@
         return null;
     }
 
+    public String getLeaderCode(){
+        RoleService service = SpringUtils.getBean(RoleService.class);
+        Role role = service.selectById(this.leader);
+        if (!Cools.isEmpty(role)){
+            return String.valueOf(role.getCode());
+        }
+        return null;
+    }
+
     public void setLeader(Long leader) {
         this.leader = leader;
     }

--
Gitblit v1.9.1