From 79e0d3094c1fcf9025938479b6e46d2e9dfebdb6 Mon Sep 17 00:00:00 2001 From: 张天森 <1292933220@qq.com> Date: 星期四, 08 十二月 2022 15:02:23 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/haucheng_panzhihua' into haucheng_panzhihua --- springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java | 72 +++++++++++++++++++++++++++-------- 1 files changed, 55 insertions(+), 17 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 65dc8d7..2f1fbf0 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 @@ -380,6 +380,13 @@ loginUserInfoVO.setIsDpcMember(1); } } + //是否为物业公司账号 + if (nonNull(sysUserDO.getPhone())){ + Long propertyAccount = userDao.isPropertyAccount(sysUserDO.getPhone()); + if (nonNull(propertyAccount)){ + loginUserInfoVO.setPropertyId(propertyAccount); + } + } return R.ok(loginUserInfoVO); } @@ -541,6 +548,16 @@ if (nonNull(sysUser)){ loginUserInfoVO.setBackstageUserId(sysUser.getUserId()); loginUserInfoVO.setBackstageType(5); + Long storeId = userDao.selectStoreIdIdByUserId(sysUser.getUserId()); + loginUserInfoVO.setStoreIdId(storeId); + + } + //是否为物业公司账号 + if (nonNull(sysUserDO.getPhone())){ + Long propertyAccount = userDao.isPropertyAccount(sysUserDO.getPhone()); + if (nonNull(propertyAccount)){ + loginUserInfoVO.setPropertyId(propertyAccount); + } } //获取自提点账号 if (StrUtil.isNotBlank(sysUserDO.getPhone())){ @@ -869,6 +886,14 @@ if (sysUserDO.getBindingCheckUnitId() != null) { loginUserInfoVO.setBackstageType(4); } + //判断是否是商家账号 + Long storeId = userDao.selectStoreIdIdByUserId(sysUserDO.getUserId()); + if (null != storeId){ + loginUserInfoVO.setBackstageUserId(sysUserDO.getUserId()); + loginUserInfoVO.setBackstageType(5); + loginUserInfoVO.setStoreIdId(storeId); + } + return R.ok(loginUserInfoVO); } @@ -1374,7 +1399,6 @@ menu.add(300L); menu.add(303L); } - sysRoleDO.setRoleSort(0); sysRoleDO.setCreateBy(administratorsUserVO.getUserId()); SysRoleDO sysRoleDO1 = roleDAO.selectOne( @@ -1391,9 +1415,8 @@ this.putMenuRole(menuRoleVO); } } - if (administratorsUserVO.getType().equals(20)){ - roleId=1559112102373756548L; - } + log.info("======================type"+administratorsUserVO.getType()); + log.info("=======================roleId"+roleId); SysRoleDO roleDO = roleDAO.selectById(roleId); if (ObjectUtils.isEmpty(roleDO)) { return R.fail("角色不存在"); @@ -1401,6 +1424,9 @@ String encode = new BCryptPasswordEncoder().encode(administratorsUserVO.getPassword()); administratorsUserVO.setPassword(encode); BeanUtils.copyProperties(administratorsUserVO, sysUserDO); + if (nonNull(administratorsUserVO.getAppid())){ + sysUserDO.setAppId(administratorsUserVO.getAppid()); + } int insert = 0; try { insert = userDao.insert(sysUserDO); @@ -1414,7 +1440,6 @@ } else if (e.getMessage().contains("23000")) { throw new ServiceException("手机号已存在"); } - } if (insert > 0) { SysUserDO sysUserDO1 = userDao @@ -3751,16 +3776,16 @@ @Override public R getAllCommunityList() { List<Integer> areaList = areaCodeList(); - List<AreaVOS> areaVOList = new ArrayList<>(); + List<AreaVOStr> areaVOList = new ArrayList<>(); for (Integer code : areaList) { - AreaVOS areaVO = new AreaVOS(); - areaVO.setId(code); + AreaVOStr areaVO = new AreaVOStr(); + areaVO.setId(code+""); areaVO.setName(areaCodeToName(code.longValue())); - List<StreetVOS> streetVOS = userDao.selectStreetByAreaCode(code); - Iterator<StreetVOS> iterator = streetVOS.listIterator(); + List<StreetVOStr> streetVOS = userDao.selectStreetByAreaCodeStr(code); + Iterator<StreetVOStr> iterator = streetVOS.listIterator(); while (iterator.hasNext()) { - StreetVOS vo = iterator.next(); - List<CommunityVO> communityVOS = userDao.selectCommunityByStreetId(vo.getId(), 3); + StreetVOStr vo = iterator.next(); + List<CommunityVO> communityVOS = userDao.selectCommunityByStreetId(Long.parseLong(vo.getId()), 3); vo.setChildList(communityVOS); } @@ -3993,17 +4018,30 @@ @Override public R feedBackReply(SysUserFeedbackVO sysUserFeedbackVO) { - SysUserFeedbackDO sysUserFeedbackDO=new SysUserFeedbackDO(); - BeanUtils.copyProperties(sysUserFeedbackVO, sysUserFeedbackDO); - return R.ok(sysUserFeedbackDAO.updateById(sysUserFeedbackDO)); + if (isNull(sysUserFeedbackVO.getReply())){ + return R.fail("回复内容不能为空"); + } + SysUserFeedbackDO sysUserFeedbackDO1 = sysUserFeedbackDAO.selectById(sysUserFeedbackVO.getId()); + sysUserFeedbackDO1.setReply(sysUserFeedbackVO.getReply()); + return R.ok(sysUserFeedbackDAO.reply(sysUserFeedbackDO1)); } @Override - public R myFeedBack(Long id,Integer type) { - List<SysUserFeedbackDO> sysUserFeedbackDOS = sysUserFeedbackDAO.selectList(new QueryWrapper<SysUserFeedbackDO>().lambda().eq(SysUserFeedbackDO::getType, type).eq(SysUserFeedbackDO::getUserId, id)); + public R myFeedBack(Long id,Integer type,Long propertyId) { + List<SysUserFeedbackDO> sysUserFeedbackDOS = sysUserFeedbackDAO.selectList(new QueryWrapper<SysUserFeedbackDO>().lambda().eq(SysUserFeedbackDO::getType, type).eq(SysUserFeedbackDO::getUserId, id).eq(SysUserFeedbackDO::getPropertyId,propertyId )); return R.ok(sysUserFeedbackDOS); } + @Override + public R propertyCheck(String phone) { + Long propertyAccount = userDao.isPropertyAccount(phone); + log.info("==============物业公司id"+propertyAccount); + if (isNull(propertyAccount)){ + return R.fail(); + } + return R.ok(propertyAccount); + } + @Override public R getAreaAndStreet() { -- Gitblit v1.7.1