huanghongfa
2021-06-22 3875a8f62bd6cecd78f56fb9a6911fa44891dfed
springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/EventApi.java
@@ -7,6 +7,7 @@
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActVO;
import com.panzhihua.common.model.vos.grid.EventGridDataAreaVO;
import com.panzhihua.common.model.vos.grid.EventSpecialPopulationVO;
import com.panzhihua.common.utlis.ClazzUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -47,6 +48,8 @@
        LoginUserInfoVO loginUserInfoVO = getLoginUserInfo();
        eventRevokeDTO.setUserId(loginUserInfoVO.getUserId());
        eventRevokeDTO.setUserName(loginUserInfoVO.getNickName());
        eventRevokeDTO.setRevokeType(1);
        eventRevokeDTO.setRevokeId(loginUserInfoVO.getUserId());
        return gridService.emergenciesRevoke(eventRevokeDTO);
    }
@@ -63,14 +66,14 @@
    /**
     * 删除
     * @param eventDeleteDTO 删除事件传递对象
     * @param commonEventDeleteDTO 删除事件传递对象
     * @return 删除结果
     */
    @DeleteMapping()
    @ApiOperation(value = "删除事件", response = R.class)
    R delete(@Validated @RequestBody EventDeleteDTO  eventDeleteDTO){
        ClazzUtils.setIfStringIsEmpty(eventDeleteDTO);
        return gridService.delete(eventDeleteDTO);
    R delete(@Validated @RequestBody CommonEventDeleteDTO  commonEventDeleteDTO){
        ClazzUtils.setIfStringIsEmpty(commonEventDeleteDTO);
        return gridService.delete(commonEventDeleteDTO);
    }
    /**
     * 重新发布事件
@@ -124,4 +127,13 @@
        return gridService.getNearByGrid(pageEventGridNearbyDTO);
    }
    @ApiOperation(value = "查询社区特殊人群列表", response = EventSpecialPopulationVO.class)
    @PostMapping("/special/population/list")
    public R specialPopulationList(@RequestBody PageEventSpecialPopulationDTO specialPopulationDTO){
        LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo();
        specialPopulationDTO.setCommunityId(loginUserInfoVO.getCommunityId());
        return gridService.specialPopulationList(specialPopulationDTO);
    }
}