From 893f8cffb39a6c728d231f0f63895388e9a21ae1 Mon Sep 17 00:00:00 2001
From: luoyuanqiao <2376770955@qq.com>
Date: 星期三, 02 三月 2022 17:09:02 +0800
Subject: [PATCH] Merge branch 'dev' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into partyBuilding_lyq

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialOrgServiceImpl.java |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialOrgServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialOrgServiceImpl.java
index a5d580a..ebee445 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialOrgServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialOrgServiceImpl.java
@@ -39,7 +39,7 @@
 
     @Override
     public R selectById(Long id) {
-        return null;
+        return R.ok(comActSocialOrgDao.detail(id));
     }
 
     @Override
@@ -52,8 +52,21 @@
             administratorsUserVO.setType(3);
             administratorsUserVO.setAccount(comActSocialOrgVO.getAccount());
             administratorsUserVO.setPassword(comActSocialOrgVO.getPassword());
-            administratorsUserVO.setRoleId(comActSocialOrgVO.getRoleId());
-            administratorsUserVO.setCommunityId(comActSocialOrg.getCommunityId());
+            //根据roleId判断是普通社会组织还是定制三社
+            if(comActSocialOrgVO.getRoleId()==null){
+                administratorsUserVO.setSocialType(2);
+                administratorsUserVO.setRoleId(777777777L);
+                comActSocialOrg.setIsSociety(1);
+            }
+            else {
+                administratorsUserVO.setRoleId(comActSocialOrgVO.getRoleId());
+            }
+            if(comActSocialOrg.getCommunityId()!=null){
+                administratorsUserVO.setCommunityId(comActSocialOrg.getCommunityId());
+            }
+            if(comActSocialOrg.getStreetId()!=null){
+                administratorsUserVO.setStreetId(comActSocialOrg.getStreetId());
+            }
             administratorsUserVO.setName(comActSocialOrgVO.getContactName());
             administratorsUserVO.setPhone(comActSocialOrgVO.getContactPhone());
             R r=userService.addUserBackstageProperty(administratorsUserVO);

--
Gitblit v1.7.1