From c8e17c2d4cb8ee564308698c5ca2a2d3a50e6174 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期二, 21 十二月 2021 09:44:55 +0800
Subject: [PATCH] 12/21  河门口 街道功能修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComStreetServiceImpl.java |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComStreetServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComStreetServiceImpl.java
index f7d596b..03574a5 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComStreetServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComStreetServiceImpl.java
@@ -66,14 +66,26 @@
         if (integer > 0) {
             return R.fail(500, "街道已经存在");
         }
-        BeanUtils.copyProperties(comStreetVO, comStreetDO);
-        int insert = comStreetDAO.insert(comStreetDO);
-        if (insert > 0) {
-            ComStreetDO comStreetDO1 = comStreetDAO.selectOne(param);
-            BeanUtils.copyProperties(comStreetDO1, comStreetVO);
-            return R.ok(comStreetVO);
+        AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO();
+        administratorsUserVO.setType(3);
+        administratorsUserVO.setAccount(comStreetVO.getAccount());
+        administratorsUserVO.setPassword(comStreetVO.getPassword());
+        administratorsUserVO.setSocialType(1);
+        administratorsUserVO.setRoleId(777777777L);
+        administratorsUserVO.setStreetId(0L);
+        administratorsUserVO.setName(comStreetVO.getName());
+        R r=userService.addUserBackstageProperty(administratorsUserVO);
+        if(R.isOk(r)){
+            BeanUtils.copyProperties(comStreetVO, comStreetDO);
+            int insert = comStreetDAO.insert(comStreetDO);
+            if (insert > 0) {
+                ComStreetDO comStreetDO1 = comStreetDAO.selectOne(param);
+                BeanUtils.copyProperties(comStreetDO1, comStreetVO);
+                return R.ok(comStreetVO);
+            }
+            return R.fail(500, "");
         }
-        return R.fail(500, "");
+        return R.fail("账号已存在");
     }
 
     /**

--
Gitblit v1.7.1