From ad2201f809f45cbbe2e63a829e4c93a9c7b7f67c Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期五, 11 十一月 2022 10:00:19 +0800 Subject: [PATCH] #feat 修改 --- springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 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 6562c08..0271801 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 @@ -792,6 +792,13 @@ //是否是防疫工作人员 loginUserInfoVO.setIsAcidMember(0); ComActAcidMemberVO acidMember = userDao.selectAcidMemberByPhone(loginUserInfoVO.getPhone()); + //是否为普达物业公司后台账号 + if (nonNull(sysUserDO.getPhone())){ + Long propertyAccount = userDao.isPropertyAccount(sysUserDO.getPhone()); + if (nonNull(propertyAccount)){ + loginUserInfoVO.setPropertyId(propertyAccount); + } + } if (nonNull(acidMember)) { if (acidMember.getRelationName().equals("panzhihua") || acidMember.getRelationName().equals("西区") || acidMember.getRelationName().equals("东区") || acidMember.getRelationName().equals("仁和区") || acidMember.getRelationName().equals("米易县") || acidMember.getRelationName().equals("盐边县")) { loginUserInfoVO.setIsAcidMember(1); @@ -1353,6 +1360,9 @@ menuRoleVO.setRoleId(sysRoleDO.getRoleId()); this.putMenuRole(menuRoleVO); } + } + if (administratorsUserVO.getType().equals(20)){ + roleId=1559112102373756548L; } SysRoleDO roleDO = roleDAO.selectById(roleId); if (ObjectUtils.isEmpty(roleDO)) { @@ -2845,7 +2855,8 @@ @Transactional(rollbackFor = Exception.class) public R addConvenientMerchantUser(ConvenientMerchantDTO convenientMerchantDTO) { SysUserDO sysUserDO; - sysUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getAccount, convenientMerchantDTO.getAccount())); + sysUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getAccount, convenientMerchantDTO.getAccount()) + .eq(SysUserDO::getPhone,convenientMerchantDTO.getMobilePhone()).eq(SysUserDO::getAppId,"wx118de8a734d269f0")); if (nonNull(sysUserDO)) { return R.fail("账户已经存在"); } @@ -2854,10 +2865,10 @@ String encode = new BCryptPasswordEncoder().encode(convenientMerchantDTO.getPassword()); BeanUtils.copyProperties(convenientMerchantDTO, sysUserDO); sysUserDO.setAccount(convenientMerchantDTO.getAccount()); - sysUserDO.setType(10); + sysUserDO.setType(5); sysUserDO.setAreaId(null); sysUserDO.setStatus(1); - sysUserDO.setPhone(null); + sysUserDO.setPhone(convenientMerchantDTO.getMobilePhone()); sysUserDO.setName(convenientMerchantDTO.getContacts()); sysUserDO.setPassword(encode); try { -- Gitblit v1.7.1