From 0eb28fecafb15512c82aeae00b40fb1bca65f08c Mon Sep 17 00:00:00 2001 From: luofl <1442745593@qq.com> Date: 星期五, 21 三月 2025 18:41:57 +0800 Subject: [PATCH] 修改按钮权限 --- springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/IdentityInformationServiceImpl.java | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/IdentityInformationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/IdentityInformationServiceImpl.java index 67faa01..b3678da 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/IdentityInformationServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_sangeshenbian/src/main/java/com/panzhihua/sangeshenbian/service/impl/IdentityInformationServiceImpl.java @@ -51,20 +51,29 @@ Integer isConfirm = (Integer) redisUtils.get("confirmContent:" + loginUserInfo.getPhone()); identityInformationVO.setIsConfirmContent(isConfirm != null && isConfirm == 1); - // 获取当前身份 - if (identity == null && systemUser != null) { - identityInformationVO.setIdentity(2); - redisUtils.set("identity:" + loginUserInfo.getPhone(), 2); - } else if (identity == null && partyMember != null) { - identityInformationVO.setIdentity(1); - redisUtils.set("identity:" + loginUserInfo.getPhone(), 1); - } else if(identity == null){ - identityInformationVO.setIdentity(null); - redisUtils.remove("identity:" + loginUserInfo.getPhone()); - } else { - identityInformationVO.setIdentity(identity); + if (identity == null){ + if (systemUser != null){ + identityInformationVO.setIdentity(2); + redisUtils.set("identity:" + loginUserInfo.getPhone(), 2); + }else if (partyMember != null && partyMember.getAuditStatus() == 1){ + identityInformationVO.setIdentity(1); + redisUtils.set("identity:" + loginUserInfo.getPhone(), 1); + }else { + identityInformationVO.setIdentity(null); + } + }else { + if (identity == 1 && (partyMember == null || partyMember.getAuditStatus() != 1)){ + identityInformationVO.setIdentity(null); + redisUtils.remove("identity:" + loginUserInfo.getPhone()); + }else if (identity == 2 && systemUser == null){ + identityInformationVO.setIdentity(null); + redisUtils.remove("identity:" + loginUserInfo.getPhone()); + }else { + identityInformationVO.setIdentity(identity); + } } + // 获取是否冻结 @@ -109,7 +118,7 @@ } // 封装党员信息 - if (partyMember != null) { + if (partyMember != null && partyMember.getAuditStatus().equals(1)) { PermissionsVO partyMemberPermissions = new PermissionsVO(); partyMemberPermissions.setIdentity(1); partyMemberPermissions.setName(String.format("%s%s", partyMember.getCommunity(), "党员")); -- Gitblit v1.7.1