From d1d14fb3bf0afce58d0008418ae014d07f76f2a4 Mon Sep 17 00:00:00 2001
From: huanghongfa <18228131219@163.com>
Date: 星期五, 05 二月 2021 14:52:17 +0800
Subject: [PATCH] all

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
index 27e1149..55dad24 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
@@ -65,9 +65,26 @@
     @Override
     public R putCommunity(ComActVO comActVO) {
         ComActDO comActDO=new ComActDO();
+        String password = comActVO.getPassword();
+        String account = comActVO.getAccount();
+        Long communityId = comActVO.getCommunityId();
+//        String contacts = comActVO.getContacts();
+        int a=0;
+        if (!ObjectUtils.isEmpty(password)) {
+            String encode = new BCryptPasswordEncoder().encode(password);
+            comActVO.setPassword(encode);
+            a=1;
+        }
+//        if(!ObjectUtils.isEmpty(account)||!ObjectUtils.isEmpty(contacts)){
+//            a=1;
+//        }
         BeanUtils.copyProperties(comActVO,comActDO);
         int update = comActDAO.updateById(comActDO);
         if (update>0) {
+            if (a==1) {
+//                修改登录账户的密码
+                comActDAO.updateAccountPassword(comActVO.getPassword(),account,communityId);
+            }
             return R.ok();
         }
         return R.fail();

--
Gitblit v1.7.1