From c0c83523c9f8108fecf0402adf3fe4bfb40f2e5e Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期三, 16 六月 2021 20:59:15 +0800
Subject: [PATCH] 修改bug

---
 springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
index 57d00be..e7012b4 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -1917,6 +1917,9 @@
             sysUserDO.setName(sysUserDO.getNickName());
         }
         sysUserDO.setType(6);
+        if(StringUtils.isEmpty(eventGridMemberAddDTO.getImageUrl())){
+            sysUserDO.setImageUrl(Constants.ZONG_ZHI_GRID_MEMBER_IMAGE_URL);
+        }
         int insert = 0;
         try {
             insert = userDao.insert(sysUserDO);
@@ -1928,9 +1931,9 @@
             e.printStackTrace();
             log.error("新增后台用户报错【{}】", e.getMessage());
             if (e.getMessage().contains("union_phone_type")) {
-                throw new ServiceException("手机号已经存在");
+                return R.fail("手机号已经存在");
             } else if (e.getMessage().contains("union_account_type")) {
-                throw new ServiceException("账户已经存在");
+                return R.fail("账户已经存在");
             }
         }
         if(insert > 0){
@@ -1983,9 +1986,9 @@
             e.printStackTrace();
             log.error("修改网格员用户报错【{}】", e.getMessage());
             if (e.getMessage().contains("union_phone_type")) {
-                throw new ServiceException("手机号已经存在");
+                return R.fail("手机号已经存在");
             } else if (e.getMessage().contains("union_account_type")) {
-                throw new ServiceException("账户已经存在");
+                return R.fail("账户已经存在");
             }
         }
         if(insert > 0){
@@ -2034,4 +2037,15 @@
         userDao.gridMemberEditStatus(gridMemberEditDTO);
         return R.ok();
     }
+
+    public R noTips(Long userId){
+        SysUserDO userDO = this.userDao.selectById(userId);
+        if(userDO != null){
+            userDO.setBigAgeTips(2);
+            if(this.userDao.updateById(userDO) > 0){
+                return R.ok();
+            }
+        }
+        return R.fail();
+    }
 }

--
Gitblit v1.7.1