From f4925db559734b543a1d3fdb0dea8da3b395b4a9 Mon Sep 17 00:00:00 2001 From: CeDo <cedoogle@gmail.com> Date: 星期一, 07 六月 2021 19:46:50 +0800 Subject: [PATCH] bugfixed --- springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/EventApi.java | 43 +++++++++++++++++++++++++++++++------------ 1 files changed, 31 insertions(+), 12 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/EventApi.java b/springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/EventApi.java index 92dfe0e..2f1ed6b 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/EventApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/EventApi.java @@ -5,9 +5,9 @@ import com.panzhihua.common.model.dtos.grid.*; import com.panzhihua.common.model.vos.LoginUserInfoVO; import com.panzhihua.common.model.vos.R; -import com.panzhihua.common.model.vos.community.ComMngPopulationVO; +import com.panzhihua.common.model.vos.community.ComActVO; +import com.panzhihua.common.model.vos.grid.EventGridDataAreaVO; import com.panzhihua.common.utlis.ClazzUtils; -import com.panzhihua.common.utlis.IdCardUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; @@ -18,7 +18,6 @@ import javax.annotation.Resource; import com.panzhihua.common.model.vos.grid.EventDetailsVO; -import com.panzhihua.common.model.vos.grid.EventVO; /** * @@ -32,7 +31,6 @@ @RequestMapping("/event") @Api(tags = {"网格综治事件管理 @chendong", "宣传教育 @chendong","特殊人群上报(开发中..) @chendong"}) public class EventApi extends BaseController { - @Resource private GridService gridService; @@ -48,7 +46,7 @@ ClazzUtils.setIfStringIsEmpty(eventRevokeDTO); LoginUserInfoVO loginUserInfoVO = getLoginUserInfo(); eventRevokeDTO.setUserId(loginUserInfoVO.getUserId()); - eventRevokeDTO.setUserName(loginUserInfoVO.getName()); + eventRevokeDTO.setUserName(loginUserInfoVO.getNickName()); return gridService.emergenciesRevoke(eventRevokeDTO); } @@ -76,17 +74,17 @@ } /** * 重新发布事件 - * @param commonEventRepublicDTO 重新发布事件传递对象 + * @param commonEventRepublishDTO 重新发布事件传递对象 * @return 修改结果 */ @PutMapping("/republish") @ApiOperation(value = "重新发布事件", response = R.class) - R republish(@Validated @RequestBody CommonEventRepublicDTO commonEventRepublicDTO){ - ClazzUtils.setIfStringIsEmpty(commonEventRepublicDTO); + R republish(@Validated @RequestBody CommonEventRepublishDTO commonEventRepublishDTO){ + ClazzUtils.setIfStringIsEmpty(commonEventRepublishDTO); LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); - commonEventRepublicDTO.setUserId(loginUserInfoVO.getUserId()); - commonEventRepublicDTO.setUserName(loginUserInfoVO.getName()); - return gridService.republishEvent(commonEventRepublicDTO); + commonEventRepublishDTO.setUserId(loginUserInfoVO.getUserId()); + commonEventRepublishDTO.setUserName(loginUserInfoVO.getNickName()); + return gridService.republishEvent(commonEventRepublishDTO); } @@ -101,8 +99,29 @@ ClazzUtils.setIfStringIsEmpty(commonEventPublicDTO); LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo(); commonEventPublicDTO.setUserId(loginUserInfoVO.getUserId()); - commonEventPublicDTO.setUserName(loginUserInfoVO.getName()); + commonEventPublicDTO.setUserName(loginUserInfoVO.getNickName()); return gridService.draftRelease(commonEventPublicDTO); } + /** + * 查询社区列表 + * @return 查找结果 + */ + @GetMapping("/actList") + @ApiOperation(value = "查询社区列表", response = ComActVO.class) + R actList(){ + return gridService.actList(); + } + + /** + * 查询距离当前事件最近的网格数据 + * @param pageEventGridNearbyDTO + * @return + */ + @PostMapping("/grid/nearby") + @ApiOperation(value = "查询经纬度所在的网格", response = EventGridDataAreaVO.class) + R getNearByGrid(@Validated @RequestBody PageEventGridNearbyDTO pageEventGridNearbyDTO){ + return gridService.getNearByGrid(pageEventGridNearbyDTO); + } + } \ No newline at end of file -- Gitblit v1.7.1