From b03d6975514e07ab91b2b033098a0d65ded19b15 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期四, 17 二月 2022 17:45:45 +0800
Subject: [PATCH] 三社功能提交

---
 springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
index 28590d1..357223e 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -358,6 +358,7 @@
         loginUserInfoVO.setIsFourMember(2);
         loginUserInfoVO.setIsCommunityWorker(2);
         loginUserInfoVO.setIsPropertyWorker(2);
+        loginUserInfoVO.setIsSocialWorker(2);
         // 志愿者状态
         String phone = sysUserDO.getPhone();
         Long userCommunityId = sysUserDO.getCommunityId();
@@ -396,6 +397,10 @@
                 loginUserInfoVO.setIsmemberrole(1);
             } else if (isSysUser != null && isSysUser > 0) {
                 loginUserInfoVO.setIsmemberrole(1);
+            }
+            Integer countSocialWorker = userDao.countSocialWorker(phone,userCommunityId);
+            if(countSocialWorker>0){
+                loginUserInfoVO.setIsSocialWorker(1);
             }
         }
         loginUserInfoVO.setIsRealNamed(sysUserDO.getIdCard() != null);
@@ -681,6 +686,19 @@
         loginUserInfoVO.setIsPropertyWorker(countPropertyWorker > 0 ? 1 : 0);
         loginUserInfoVO.setIdCard(SensitiveUtil.desensitizedIdNumber(loginUserInfoVO.getIdCard()));
         loginUserInfoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(loginUserInfoVO.getPhone()));
+        //判断账号类型
+        int countSocialOrg=userDao.countSocialOrg(userId);
+        if(countSocialOrg>0){
+            loginUserInfoVO.setUserType(3);
+        }
+        else {
+            if(loginUserInfoVO.getStreetId()!=null){
+                loginUserInfoVO.setUserType(1);
+            }
+            else {
+                loginUserInfoVO.setUserType(2);
+            }
+        }
         return R.ok(loginUserInfoVO);
     }
 

--
Gitblit v1.7.1