huanghongfa
2021-01-07 ae33fef700e5d2558dffb03c8f66358da2545791
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
@@ -940,7 +940,48 @@
        return comActService.listCommunityAll();
    }
    /**
     * 社区管理后台数据看板 代办事件
     * @param communityId 社区id
     * @param userId 登录用户信息
     * @return 代办事件列表
     */
    @PostMapping("indexdatacommunitybackstage")
    public R indexDataCommunityBackstage(@RequestParam("communityId") Long communityId, @RequestParam("userId")Long userId){
        List<TodoEventsVO> todoEventsVOS=new ArrayList<>();
        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);
        }
        return R.ok(todoEventsVOS);
    }
    /**
     * 删除社区
     * @param communityId 社区id
     * @return 删除结果
     */
    @PostMapping("delectcommunity")
    public R delectCommunity(@RequestParam("communityId") Long communityId){
        return comActService.delectCommunity(communityId);
    }
    /**
     * 定时任务刷新社区动态置顶状态
     * @return 刷新结果
     */
    @PostMapping("timedtaskdynistopping")
    public R timedTaskDynIstopping(){
        return comActDynService.timedTaskDynIstopping();
    }