| | |
| | | return R.fail("社区已经存在"); |
| | | } |
| | | BeanUtils.copyProperties(comActVO, comActDO); |
| | | comActDO.setPlaintextPassword(password); |
| | | int insert = comActDAO.insert(comActDO); |
| | | if (insert > 0) { |
| | | ComActDO comActDO1 = |
| | |
| | | if (!ObjectUtils.isEmpty(password)) { |
| | | String encode = new BCryptPasswordEncoder().encode(password); |
| | | comActVO.setPassword(encode); |
| | | comActDO.setPlaintextPassword(password); |
| | | a = 1; |
| | | } |
| | | ComStreetDO comStreetDO = comStreetDAO.selectById(comActVO.getStreetId()); |
| | |
| | | // a=1; |
| | | // } |
| | | BeanUtils.copyProperties(comActVO, comActDO); |
| | | |
| | | // ComActDO selectOne = comActDAO.selectOne(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getAccount, account)); |
| | | // if (null != selectOne && selectOne.getAccount().equals(comActVO.getAccount())) { |
| | | // return R.fail("该登录账号重复,请重新修改"); |
| | |
| | | * @return 社区集合 按照创建顺序倒序排列 |
| | | */ |
| | | @Override |
| | | public R listCommunityAll() { |
| | | public R listCommunityAll(String areaCode) { |
| | | List<ComActDO> comActDOS = comActDAO.selectList(new QueryWrapper<ComActDO>().lambda().eq(ComActDO::getState, 0) |
| | | .eq(ComActDO::getCityCode, "510400").orderByDesc(ComActDO::getCreateAt)); |
| | | .eq(ComActDO::getAreaCode, areaCode).orderByDesc(ComActDO::getCreateAt)); |
| | | List<ComActVO> comActVOS = new ArrayList<>(); |
| | | if (!ObjectUtils.isEmpty(comActDOS)) { |
| | | comActDOS.forEach(comActDO -> { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R getWestCommunityLists() { |
| | | return R.ok(this.comActDAO.getWestCommunityLists()); |
| | | public R getWestCommunityLists(String areaCode) { |
| | | return R.ok(this.comActDAO.getWestCommunityLists(areaCode)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @Override |
| | | public R getCommunityAllList() { |
| | | public R getCommunityAllList(String areaCode) { |
| | | // 查询街道列表 |
| | | List<StreetAllAppletsVO> streetList = this.comActDAO.getStreetList(); |
| | | List<StreetAllAppletsVO> streetList = this.comActDAO.getStreetList(areaCode); |
| | | streetList.forEach(street -> { |
| | | // 查询街道下社区列表 |
| | | List<CommunitySwitchAllAppletsVO> communityList = |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @Override |
| | | public R communitySwitchSearchList(String name) { |
| | | return R.ok(this.comActDAO.getCommunityListByName(name)); |
| | | public R communitySwitchSearchList(String name,String areaCode) { |
| | | return R.ok(this.comActDAO.getCommunityListByName(name,areaCode)); |
| | | } |
| | | |
| | | /** |
| | |
| | | return R.ok(this.comActDAO.getCommunityListByNearby(communityDTO)); |
| | | } |
| | | |
| | | @Override |
| | | public R getCommunityPassword(Long communityId){ |
| | | return R.ok(comActDAO.getCommunityPassword(communityId)); |
| | | } |
| | | |
| | | } |