From c1e48a47b39dbd6919bfd9cf2e7023e9f3d6fee8 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期五, 05 十一月 2021 10:24:21 +0800
Subject: [PATCH] 1105测试代码修改

---
 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