| | |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | } |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<ComActDynVO> iPage = comMngStructAreaDAO.pageArea(page, comMngStructAreaVO); |
| | | IPage<ComMngStructAreaVO> iPage = comMngStructAreaDAO.pageArea(page, comMngStructAreaVO); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public R listArea(Long communityId) { |
| | | List<ComMngStructAreaVO> comMngStructAreaVOS=new ArrayList<>(); |
| | | List<ComMngStructAreaDO> comMngStructAreaDOS = comMngStructAreaDAO.selectList(new QueryWrapper<ComMngStructAreaDO>().lambda().eq(ComMngStructAreaDO::getCommunityId, communityId)); |
| | | return R.ok(comMngStructAreaDOS); |
| | | if (!ObjectUtils.isEmpty(comMngStructAreaDOS)) { |
| | | comMngStructAreaDOS.forEach(comMngStructAreaDO -> { |
| | | ComMngStructAreaVO comMngStructAreaVO=new ComMngStructAreaVO(); |
| | | BeanUtils.copyProperties(comMngStructAreaDO,comMngStructAreaVO); |
| | | comMngStructAreaVOS.add(comMngStructAreaVO); |
| | | }); |
| | | |
| | | } |
| | | return R.ok(comMngStructAreaVOS); |
| | | } |
| | | |
| | | /** |
| | | * 小区详情 |
| | | * |
| | | * @param areaId 小区id |
| | | * @return 小区信息 |
| | | */ |
| | | @Override |
| | | public R detailArea(Long areaId) { |
| | | ComMngStructAreaDO comMngStructAreaDO = comMngStructAreaDAO.selectById(areaId); |
| | | if (ObjectUtils.isEmpty(comMngStructAreaDO)) { |
| | | return R.fail("小区不存在"); |
| | | } |
| | | ComMngStructAreaVO comMngStructAreaVO=new ComMngStructAreaVO(); |
| | | BeanUtils.copyProperties(comMngStructAreaDO,comMngStructAreaVO); |
| | | return R.ok(comMngStructAreaVO); |
| | | } |
| | | |
| | | |