From 5f349fe34e3e33625f8593ec1b616f0c4528a12c Mon Sep 17 00:00:00 2001
From: 罗元桥 <2376770955@qq.com>
Date: 星期一, 27 九月 2021 10:33:45 +0800
Subject: [PATCH] Merge branch 'test' into 'test_bak'

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialOrgServiceImpl.java |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 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 ecdd5fd..a5d580a 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
@@ -8,6 +8,7 @@
 import com.panzhihua.common.model.vos.community.ComActSocialOrgVO;
 import com.panzhihua.common.model.vos.user.AdministratorsUserVO;
 import com.panzhihua.common.service.user.UserService;
+import com.panzhihua.service_community.entity.ComActCommittee;
 import com.panzhihua.service_community.entity.ComActSocialOrg;
 import com.panzhihua.service_community.dao.ComActSocialOrgDao;
 import com.panzhihua.service_community.service.ComActSocialOrgService;
@@ -62,7 +63,7 @@
                 this.comActSocialOrgDao.insert(comActSocialOrg);
                 return R.ok();
             }
-            return R.fail(r.getMsg());
+            return R.fail("账号或手机号已存在");
         }
         return R.fail();
     }
@@ -72,6 +73,14 @@
         if(comActSocialOrgVO!=null){
                ComActSocialOrg comActSocialOrg=new ComActSocialOrg();
                BeanUtils.copyProperties(comActSocialOrgVO,comActSocialOrg);
+                if(comActSocialOrgVO.getRoleId()!=null){
+                    ComActSocialOrg comPropertyBase=this.comActSocialOrgDao.selectById(comActSocialOrgVO.getId());
+                    AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO();
+                    administratorsUserVO.setUserId(comPropertyBase.getUserId());
+                    administratorsUserVO.setRoleId(comActSocialOrgVO.getRoleId());
+                    administratorsUserVO.setLastLoginTime(DateUtil.date());
+                    this.userService.putUserBackstage(administratorsUserVO);
+                }
                this.comActSocialOrgDao.updateById(comActSocialOrg);
                return R.ok();
         }

--
Gitblit v1.7.1