From 0cbbecaafcfdb30d3e7370f85bbe3f3123499309 Mon Sep 17 00:00:00 2001 From: 张天森 <1292933220@qq.com> Date: 星期三, 06 七月 2022 14:50:24 +0800 Subject: [PATCH] 双争后台统计 --- springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java | 28 ++++++++++++++++++---------- 1 files changed, 18 insertions(+), 10 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 9cbf705..3a126c5 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 @@ -250,17 +250,20 @@ */ @Override public R updateUserWeiXinPhone(Long userId, String purePhoneNumber) { - SysUserDO sysUserDO = new SysUserDO(); - sysUserDO.setPhone(purePhoneNumber); - sysUserDO.setUserId(userId); - userDao.updateMemberRole(purePhoneNumber, purePhoneNumber); - userDao.updateServiceTeam(purePhoneNumber, purePhoneNumber); - int i = userDao.updateById(sysUserDO); - if (i > 0) { - return R.ok(purePhoneNumber); - } else { - return R.fail("维护微信手机号失败"); + SysUserDO sysUserDO=userDao.selectById(userId); + if(sysUserDO!=null){ + userDao.updateMemberRole(purePhoneNumber, sysUserDO.getPhone()); + userDao.updateServiceTeam(purePhoneNumber, sysUserDO.getPhone()); + sysUserDO.setPhone(purePhoneNumber); + sysUserDO.setUserId(userId); + int i = userDao.updateById(sysUserDO); + if (i > 0) { + return R.ok(purePhoneNumber); + } else { + return R.fail("维护微信手机号失败"); + } } + return R.ok(sysUserDO.getPhone()); } /** @@ -412,6 +415,11 @@ if(count>0){ loginUserInfoVO.setIsCheckUnitAdmin(1); } + Long checkUnitId=userDao.selectCheckUnitId(phone); + if(checkUnitId!=null){ + loginUserInfoVO.setCheckUnitId(checkUnitId); + } + else { loginUserInfoVO.setIsCheckUnitAdmin(0); } -- Gitblit v1.7.1