From f09fa3541ad18c00f30707f592f16d18a0537f77 Mon Sep 17 00:00:00 2001
From: manailin <261030956@qq.com>
Date: 星期二, 17 八月 2021 21:54:51 +0800
Subject: [PATCH] [新增]添加监控依赖包

---
 springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/SpecialPopulationEventApi.java |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/SpecialPopulationEventApi.java b/springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/SpecialPopulationEventApi.java
index 1af55db..9c07a54 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/SpecialPopulationEventApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/grid_app/src/main/java/com/panzhihua/grid_app/api/SpecialPopulationEventApi.java
@@ -61,7 +61,7 @@
         ClazzUtils.setIfStringIsEmpty(specialEventEditDTO);
         LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo();
         specialEventEditDTO.setUserId(loginUserInfoVO.getUserId());
-        specialEventEditDTO.setUserName(loginUserInfoVO.getName());
+        specialEventEditDTO.setUserName(loginUserInfoVO.getNickName());
         specialEventEditDTO.setPhone(loginUserInfoVO.getPhone());
         return gridService.saveSpecialDraft(specialEventEditDTO);
     }
@@ -91,7 +91,8 @@
         LoginUserInfoVO loginUserInfoVO = getLoginUserInfo();
         ClazzUtils.setIfStringIsEmpty(commonEventReportDTO);
         commonEventReportDTO.setUserId(loginUserInfoVO.getUserId());
-        commonEventReportDTO.setUserName(loginUserInfoVO.getName());
+        commonEventReportDTO.setUserName(loginUserInfoVO.getNickName());
+        commonEventReportDTO.setCommunityId(loginUserInfoVO.getCommunityId());
         return gridService.report(commonEventReportDTO);
     }
 
@@ -106,7 +107,7 @@
         ClazzUtils.setIfStringIsEmpty(commonEventDealDTO);
         LoginUserInfoVO loginUserInfoVO = new LoginUserInfoVO();
         commonEventDealDTO.setUserId(loginUserInfoVO.getUserId());
-        commonEventDealDTO.setUserName(loginUserInfoVO.getName());
+        commonEventDealDTO.setUserName(loginUserInfoVO.getNickName());
         commonEventDealDTO.setCommunityId(loginUserInfoVO.getCommunityId());
         commonEventDealDTO.setCommunityName(loginUserInfoVO.getCommunityName());
         return gridService.dealEvent(commonEventDealDTO);
@@ -123,9 +124,25 @@
         ClazzUtils.setIfStringIsEmpty(commonEventVerifyDTO);
         LoginUserInfoVO loginUserInfoVO = this.getLoginUserInfo();
         commonEventVerifyDTO.setUserId(loginUserInfoVO.getUserId());
-        commonEventVerifyDTO.setUserName(loginUserInfoVO.getName());
+        commonEventVerifyDTO.setUserName(loginUserInfoVO.getNickName());
         return gridService.verifyEvent(commonEventVerifyDTO);
     }
 
+    /**
+     * 直接上报社区
+     * @param commonEventDirectReportDTO 上报社区传递对象
+     * @return 上报结果
+     */
+    @PostMapping("/reportDirect")
+    @ApiOperation(value = "直接上报社区", response = R.class)
+    R reportDirect(@Validated @RequestBody CommonEventDirectReportDTO commonEventDirectReportDTO){
+        LoginUserInfoVO loginUserInfoVO = getLoginUserInfo();
+        ClazzUtils.setIfStringIsEmpty(commonEventDirectReportDTO);
+        commonEventDirectReportDTO.setUserId(loginUserInfoVO.getUserId());
+        commonEventDirectReportDTO.setUserName(loginUserInfoVO.getNickName());
+        commonEventDirectReportDTO.setCommunityId(loginUserInfoVO.getCommunityId());
+        return gridService.reportDirect(commonEventDirectReportDTO);
+    }
+
 
 }
\ No newline at end of file

--
Gitblit v1.7.1