| | |
| | | @PostMapping("putdynamic") |
| | | public R putDynamic(@RequestBody ComActDynVO comActDynVO) { |
| | | ComActDynDO comActDynDO = new ComActDynDO(); |
| | | Long id = comActDynVO.getId(); |
| | | BeanUtils.copyProperties(comActDynVO, comActDynDO); |
| | | Integer isTopping = comActDynVO.getIsTopping(); |
| | | boolean b = isTopping.intValue() == 1; |
| | | if(b){ |
| | | ComActDynDO comActDynDO1 = comActDynService.getById(id); |
| | | Integer status = comActDynDO1.getStatus(); |
| | | if (status.intValue()==0) { |
| | | return R.fail("该动态还未发布"); |
| | | } |
| | | } |
| | | boolean update = comActDynService.updateById(comActDynDO); |
| | | if (update) { |
| | | // 最多只能设置三条置顶状态,后边设置会取消先前设置的置顶 |
| | | Integer isTopping = comActDynVO.getIsTopping(); |
| | | boolean b = isTopping.intValue() == 1; |
| | | if (b) { |
| | | List<ComActDynDO> list = comActDynService.list(new QueryWrapper<ComActDynDO>().lambda().eq(ComActDynDO::getIsTopping, 1).eq(ComActDynDO::getCommunityId, comActDynVO.getCommunityId())); |
| | | if (!ObjectUtils.isEmpty(list)) { |
| | |
| | | return comActActivityService.indexDataCommunityBackstageEchart(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 选择导入的小区 |
| | | * @param param 小区名字 模糊查询 |
| | | * @param communityId 社区id |
| | | * @return 小区集合 ComMngStructAreaVO |
| | | */ |
| | | @PostMapping("listareas") |
| | | public R listAreas(@RequestParam("param")String param, @RequestParam("communityId")Long communityId){ |
| | | return comMngStructAreaService.listAreas(param,communityId); |
| | | } |
| | | |
| | | /** |
| | | * 检查小区是否已经批量设置过房屋并且返回小区房屋门号规则 |
| | | * @param id 小区id |
| | | * @return ComMngStructAreaVO |
| | | */ |
| | | @PostMapping("checkAreaHouse") |
| | | public R checkAreaHouse(@RequestParam("id")Long id){ |
| | | return comMngStructAreaService.checkAreaHouse(id); |
| | | } |
| | | |
| | | } |