From b2c975094e4a3cac5ba67c154e9b7b4fd0ce35c9 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期一, 25 四月 2022 17:34:36 +0800
Subject: [PATCH] 花城E+防疫修改

---
 springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java |   35 +++++++++++------------------------
 1 files changed, 11 insertions(+), 24 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java
index 6794e09..2626094 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java
@@ -42,7 +42,12 @@
     public R pageNeighborByApp(@RequestBody ComActNeighborCircleAppDTO neighborCircleAppDTO) {
         LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
         if (loginUserInfo != null) {
-            neighborCircleAppDTO.setCommunityId(loginUserInfo.getCommunityId());
+            if(loginUserInfo.getIsPartymember()==1){
+                neighborCircleAppDTO.setCommunityId(0L);
+            }
+            else {
+                neighborCircleAppDTO.setCommunityId(loginUserInfo.getCommunityId());
+            }
             neighborCircleAppDTO.setUserId(loginUserInfo.getUserId());
         }
         return communityService.pageNeighborByApp(neighborCircleAppDTO);
@@ -83,8 +88,8 @@
                     addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.yes);
                 }
             }else{
-                communityService.addSysConfValue(key + communityId,communityId,"社区邻里圈自动审核参数","2");
-                addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.yes);
+                communityService.addSysConfValue(key + communityId,communityId,"社区邻里圈自动审核参数","1");
+                addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.no);
             }
         }else{
             addNeighborCircleAppDTO.setIsExamine(AddComActNeighborCircleAppDTO.isExamine.yes);
@@ -206,27 +211,9 @@
 
     @ApiOperation(value = "查询社区邻里圈话题列表", response = ComActNeighborCircleTopicAppVO.class)
     @GetMapping("topic/list")
-    public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId,@RequestParam(value = "isZero",defaultValue = "2",required = false) Integer isZero) {
-        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
-        if (loginUserInfo != null) {
-            communityId = loginUserInfo.getCommunityId();
-        }
-        if(isZero == null){
-            isZero = 2;
-        }
-        return communityService.getNeighborTopicByApp(communityId,isZero);
-    }
-
-    @ApiOperation(value = "用户新增邻里圈话题")
-    @PostMapping("topic/add")
-    public R addNeighborTopicByApp(@RequestBody AddNeighborCircleTopicAppDTO circleTopicAppDTO) {
-        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
-        if(loginUserInfo == null){
-            return R.fail(401,"请先登录");
-        }
-        circleTopicAppDTO.setUserId(loginUserInfo.getUserId());
-        circleTopicAppDTO.setCommunityId(loginUserInfo.getCommunityId());
-        return communityService.addNeighborTopicByApp(circleTopicAppDTO);
+    public R getNeighborTopicByApp(
+            @RequestParam(value = "name",defaultValue = "",required = false) String name) {
+        return communityService.getNeighborTopicByApp(name);
     }
 
     @ApiOperation(value = "用户删除邻里圈")

--
Gitblit v1.7.1