From c7f69f55e98c9f0777d46ef04f5cb58924e8d869 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期五, 23 五月 2025 23:42:52 +0800
Subject: [PATCH] bug修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java
index 68af4ae..56a5008 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/PartyMemberServiceImpl.java
@@ -50,6 +50,7 @@
     private final IComActService comActService;
     private final RedisUtils redisUtils;
     private final ISystemUserLevelService systemUserLevelService;
+    private final IdentityInformationService identityInformationService;
     /**
      * 党员分页查询列表
      *
@@ -369,22 +370,21 @@
         if (adminUser == null){
             throw new ServiceException("无权审核");
         }
-
-        Integer identity = (Integer) redisUtils.get("identity:" + loginUserInfo.getPhone());
-        if(identity != null && identity != 2){
+        IdentityInformation identityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfo);
+        if(identityInformation.getIdentity().equals(1)){
             throw new ServiceException("请切换至管理员身份");
         }
-
-        int accountLevel = adminUser.getAccountLevel();
+        SystemUserLevel systemUserLevel = identityInformation.getSystemUserLevel();
+        int accountLevel = systemUserLevel.getLevel();
         Long communityId = null;
         String streetId = null;
         String districtsCode = null;
         if (accountLevel == ReportTypeEnum.COMMUNITY.getCode()) {
-            communityId = adminUser.getCommunityId();
+            communityId = systemUserLevel.getCommunityId();
         } else if (accountLevel == ReportTypeEnum.STREET.getCode()) {
-            streetId = adminUser.getStreetId();
+            streetId = systemUserLevel.getStreetId();
         } else if (accountLevel == ReportTypeEnum.DISTRICT.getCode()) {
-            districtsCode = adminUser.getDistrictsCode();
+            districtsCode = systemUserLevel.getDistrictsCode();
         } else if(accountLevel != ReportTypeEnum.CITY.getCode()){
             throw new ServiceException("无权审核:未知等级");
         }

--
Gitblit v1.7.1