From a5e8dc52dbf29b0ea4b39c00bfe8f88efb6aa76c Mon Sep 17 00:00:00 2001
From: 罗元桥 <2376770955@qq.com>
Date: 星期二, 28 九月 2021 20:58:41 +0800
Subject: [PATCH] Merge branch 'test_bak' into 'master'

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPropertyServiceImpl.java |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPropertyServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPropertyServiceImpl.java
index d96bb49..fbfda6a 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPropertyServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPropertyServiceImpl.java
@@ -64,7 +64,7 @@
                 this.comPropertyDao.insert(comProperty);
                 return R.ok();
             }
-            return R.fail(r.getMsg());
+            return R.fail("账号或手机号已存在");
         }
         return R.fail();
     }
@@ -74,6 +74,14 @@
         if(comPropertyVO!=null){
             ComProperty comProperty=new ComProperty();
             BeanUtils.copyProperties(comPropertyVO,comProperty);
+            if(comPropertyVO.getRoleId()!=null){
+                ComProperty comPropertyBase=this.comPropertyDao.selectById(comPropertyVO.getId());
+                AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO();
+                administratorsUserVO.setUserId(comPropertyBase.getUserId());
+                administratorsUserVO.setRoleId(comPropertyVO.getRoleId());
+                administratorsUserVO.setLastLoginTime(DateUtil.date());
+                this.userService.putUserBackstage(administratorsUserVO);
+            }
             this.comPropertyDao.updateById(comProperty);
             return R.ok();
         }

--
Gitblit v1.7.1