| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActPasswordVo; |
| | | import com.panzhihua.service_community.util.MyAESUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | ComActVO comActVO = new ComActVO(); |
| | | BeanUtils.copyProperties(comActDO, comActVO); |
| | | comActVO.setAreaName(comActDAO.selectAreaName(comActVO.getAreaCode())); |
| | | comActVO.setAccount(null); |
| | | comActVO.setPassword(null); |
| | | comActVO.setAddress(null); |
| | | comActVO.setContacts(null); |
| | | comActVO.setCreateAt(null); |
| | | comActVO.setState(null); |
| | | comActVO.setDistance(null); |
| | | return R.ok(comActVO); |
| | | } |
| | | |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @Override |
| | | public R getCommunityLists() { |
| | | return R.ok(this.comActDAO.getCommunityLists()); |
| | | public R getCommunityLists(String appId) { |
| | | return R.ok(this.comActDAO.getCommunityLists(appId)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @Override |
| | | public R getCommunityAllList(String areaCode) { |
| | | public R getCommunityAllList(String appId) { |
| | | // 查询街道列表 |
| | | List<StreetAllAppletsVO> streetList = this.comActDAO.getStreetList(areaCode); |
| | | List<StreetAllAppletsVO> streetList = this.comActDAO.getStreetList(appId); |
| | | streetList.forEach(street -> { |
| | | // 查询街道下社区列表 |
| | | List<CommunitySwitchAllAppletsVO> communityList = |
| | |
| | | * @return 社区列表 |
| | | */ |
| | | @Override |
| | | public R communitySwitchSearchList(String name,String areaCode) { |
| | | return R.ok(this.comActDAO.getCommunityListByName(name,areaCode)); |
| | | public R communitySwitchSearchList(String name,String appId) { |
| | | return R.ok(this.comActDAO.getCommunityListByName(name,appId)); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | @Override |
| | | public R getCommunityPassword(Long communityId){ |
| | | return R.ok(comActDAO.getCommunityPassword(communityId)); |
| | | ComActPasswordVo comActPasswordVo=comActDAO.getCommunityPassword(communityId); |
| | | try { |
| | | comActPasswordVo.setPassword(MyAESUtil.Decrypt(comActPasswordVo.getPassword(),"Ryo7M3n8loC5Abcd")); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return R.ok(comActPasswordVo); |
| | | } |
| | | |
| | | } |