From c1f945bc80699c368d467c6211908de27fb6255c Mon Sep 17 00:00:00 2001 From: puhanshu <a9236326> Date: 星期五, 19 十一月 2021 17:36:15 +0800 Subject: [PATCH] 物业宣传相关代码提交 --- springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 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 17eac20..2dce573 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 @@ -324,6 +324,8 @@ } loginUserInfoVO.setIsmemberrole(2); loginUserInfoVO.setIsFourMember(2); + loginUserInfoVO.setIsCommunityWorker(2); + loginUserInfoVO.setIsPropertyWorker(2); // 志愿者状态 String phone = sysUserDO.getPhone(); Long userCommunityId = sysUserDO.getCommunityId(); @@ -346,12 +348,18 @@ if(countFourMember>0){ loginUserInfoVO.setIsFourMember(1); } + //是否是社区物业人员 + int countPropertyWorker = userDao.countPropertyWorker(Long.parseLong(userId), userCommunityId); + if (countPropertyWorker > 0) { + loginUserInfoVO.setIsPropertyWorker(1); + } // 是否是"管理员"或者 本社区 "社区团队"、"党委成员" Integer countTeam = userDao.selectCountTeam(phone, userCommunityId); Integer selectCountMemberRole = userDao.selectCountMemberRole(phone, userCommunityId); Integer isSysUser = userDao.selectCountSysUser(phone, userCommunityId); if (countTeam != null && countTeam > 0) { loginUserInfoVO.setIsmemberrole(1); + loginUserInfoVO.setIsCommunityWorker(1); } else if (selectCountMemberRole != null && selectCountMemberRole > 0) { loginUserInfoVO.setIsmemberrole(1); } else if (isSysUser != null && isSysUser > 0) { @@ -582,6 +590,7 @@ if (ObjectUtils.isEmpty(sysUserDO)) { return R.fail("人员不存在"); } + BeanUtils.copyProperties(sysUserDO, loginUserInfoVO); List<ComMngFamilyInfoDO> comMngFamilyInfoDOS = comMngFamilyInfoDAO .selectList(new QueryWrapper<ComMngFamilyInfoDO>().lambda().eq(ComMngFamilyInfoDO::getUserId, userId)); @@ -635,6 +644,9 @@ if (!ObjectUtils.isEmpty(comActVO)) { loginUserInfoVO.setCommunityName(comActVO.getName()); } + //是否是社区物业人员 + int countPropertyWorker = userDao.countPropertyWorker(userId, loginUserInfoVO.getCommunityId()); + loginUserInfoVO.setIsPropertyWorker(countPropertyWorker > 0 ? 1 : 0); loginUserInfoVO.setIdCard(SensitiveUtil.desensitizedIdNumber(loginUserInfoVO.getIdCard())); loginUserInfoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(loginUserInfoVO.getPhone())); return R.ok(loginUserInfoVO); @@ -2587,10 +2599,6 @@ if (nonNull(sysUserDO)) { return R.fail("账户已经存在"); } - sysUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getPhone, convenientMerchantDTO.getPhone())); - if (nonNull(sysUserDO)) { - return R.fail("手机号已经存在"); - } // sys_user 表 sysUserDO = new SysUserDO(); String encode = new BCryptPasswordEncoder().encode(convenientMerchantDTO.getPassword()); @@ -2599,7 +2607,7 @@ sysUserDO.setType(10); sysUserDO.setAreaId(null); sysUserDO.setStatus(1); - sysUserDO.setPhone(convenientMerchantDTO.getPhone()); + sysUserDO.setPhone(null); sysUserDO.setName(convenientMerchantDTO.getContacts()); sysUserDO.setPassword(encode); try { -- Gitblit v1.7.1