From 1f615d5c6ac7b116c0bb3f075331197f284b998c Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期五, 17 六月 2022 09:21:45 +0800 Subject: [PATCH] Merge branch 'huacheng_shuangzheng' into huacheng_test --- springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java | 33 +++++++-------------------------- 1 files changed, 7 insertions(+), 26 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 9f6497e..d18f6f1 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 @@ -434,6 +434,13 @@ } loginUserInfoVO.setRelationName(acidMember.getRelationName()); } + Integer count=userDao.selectOrgAdmin(phone); + if(count>0){ + loginUserInfoVO.setIsCheckUnitAdmin(1); + } + else { + loginUserInfoVO.setIsCheckUnitAdmin(0); + } //是否网格员 int easyPhotoMember = userDao.countEasyPhotoMember(phone, userCommunityId); if (easyPhotoMember > 0) { @@ -1252,31 +1259,6 @@ } } - - if (insert > 0 && sysUserDO.getType() == 3 &&sysUserDO.getStreetId()==null) {// 添加的用户是社区账号时 - // 添加网格综合治理管理后台用户 - SysUserDO sysUserDOWangGe = new SysUserDO(); - BeanUtils.copyProperties(sysUserDO, sysUserDOWangGe); - sysUserDOWangGe.setUserId(null); - sysUserDOWangGe.setType(7);// 网格综治后台 - try { - int addWange = userDao.insert(sysUserDOWangGe); - if (addWange != 1) { - throw new ServiceException("新增网格综合治理管理后台用户失败"); - } - } catch (Exception e) { - e.printStackTrace(); - log.error("网格综合治理管理后台用户报错【{}】", e.getMessage()); - if (e.getMessage().contains("union_phone_type")) { - throw new ServiceException("手机号已经存在"); - } else if (e.getMessage().contains("union_account_type")) { - throw new ServiceException("账户已经存在"); - }else if(e.getMessage().contains("23000")){ - throw new ServiceException("手机号已存在"); - } - - } - } if (insert > 0) { SysUserDO sysUserDO1 = userDao .selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getType, administratorsUserVO.getType()) @@ -1512,7 +1494,6 @@ * @return 删除结果 */ @Override - @Transactional(rollbackFor = Exception.class) public R deleteUserBackstage(AdministratorsUserVO administratorsUserVO) { Long userId = administratorsUserVO.getUserId(); SysUserDO sysUserDO = userDao.selectById(userId); -- Gitblit v1.7.1