| | |
| | | import com.panzhihua.common.model.dtos.community.PageComActEasyPhotoCommentDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentUserDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.ComPbServiceTeamDTO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.PageComPbServiceTeamDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.SystemmanagementConfigVO; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | |
| | | private ComMngStructOtherBuildService comMngStructOtherBuildService; |
| | | @Resource |
| | | private ComMngVolunteerMngService comMngVolunteerMngService; |
| | | @Resource |
| | | private ComMngStructAreaDistrictService comMngStructAreaDistrictService; |
| | | |
| | | /** |
| | | * 新增社区活动 |
| | |
| | | }); |
| | | } |
| | | comActActivityVO1.setComActActPrizeVOList(comActActPrizeVOList); |
| | | Integer participantMax = comActActivityVO1.getParticipantMax(); |
| | | if (participantMax.intValue()==0) { |
| | | comActActivityVO1.setType(1); |
| | | }else{ |
| | | comActActivityVO1.setType(2); |
| | | } |
| | | }); |
| | | page.setRecords(content); |
| | | } |
| | |
| | | @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)) { |
| | |
| | | * @param comActVO 编辑内容 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PutMapping("putCommunity") |
| | | @PostMapping("putCommunity") |
| | | public R putCommunity(@RequestBody ComActVO comActVO) { |
| | | return comActService.putCommunity(comActVO); |
| | | } |
| | |
| | | List<TodoEventsVO> todoEventsVOS1=comActEasyPhotoService.selectNeedToDo(communityId,userId); |
| | | List<TodoEventsVO> todoEventsVOS2=comActMicroWishService.selectNeedToDo(communityId,userId); |
| | | List<TodoEventsVO> todoEventsVOS3=comMngVolunteerMngService.selectNeedToDo(communityId,userId); |
| | | if (!ObjectUtils.isEmpty(todoEventsVOS1)) { |
| | | todoEventsVOS.addAll(todoEventsVOS1); |
| | | } |
| | | if (!ObjectUtils.isEmpty(todoEventsVOS2)) { |
| | | todoEventsVOS.addAll(todoEventsVOS2); |
| | | } |
| | | if (!ObjectUtils.isEmpty(todoEventsVOS3)) { |
| | | todoEventsVOS.addAll(todoEventsVOS3); |
| | | } |
| | | |
| | | TodoEventsVO todoEventsVO=new TodoEventsVO(); |
| | | todoEventsVO.setType(1); |
| | | todoEventsVO.setNum(todoEventsVOS1.size()); |
| | | TodoEventsVO todoEventsVO1=new TodoEventsVO(); |
| | | todoEventsVO1.setType(2); |
| | | todoEventsVO1.setNum(todoEventsVOS2.size()); |
| | | TodoEventsVO todoEventsVO2=new TodoEventsVO(); |
| | | todoEventsVO2.setType(4); |
| | | todoEventsVO2.setNum(todoEventsVOS3.size()); |
| | | todoEventsVOS.add(todoEventsVO); |
| | | todoEventsVOS.add(todoEventsVO1); |
| | | todoEventsVOS.add(todoEventsVO2); |
| | | return R.ok(todoEventsVOS); |
| | | } |
| | | |
| | |
| | | return comActEasyPhotoService.addComActEasyPhotoComment(comActEasyPhotoCommentDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查询城市下属所有地区列表 |
| | | * @param cityAdcode 城市地址编码 |
| | | * @return 地区列表 |
| | | */ |
| | | @PostMapping("listareadistrict") |
| | | public R listAreaDistrict(@RequestParam("cityAdcode") Long cityAdcode){ |
| | | return comMngStructAreaDistrictService.listAreaDistrict(cityAdcode); |
| | | } |
| | | |
| | | /** |
| | | * 首页图表数据汇总 |
| | | * @param communityId 社区id |
| | | * @return 图表数据 IndexDataVO |
| | | */ |
| | | @PostMapping("indexdatacommunitybackstageechart") |
| | | public R indexDataCommunityBackstageEchart(@RequestParam("communityId")Long communityId){ |
| | | return comActActivityService.indexDataCommunityBackstageEchart(communityId); |
| | | } |
| | | |
| | | |
| | | } |