From 28e8b38e9de8cc76084d0af6a96d2d9d1e1f739f Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期四, 27 十月 2022 13:28:32 +0800
Subject: [PATCH] Merge branch 'local_20221024' into haucheng_panzhihua

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java |   35 +++++++++++++++++++++++++++++++++--
 1 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
index 850afc5..f876274 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
@@ -8,6 +8,7 @@
 
 import javax.annotation.Resource;
 
+import com.panzhihua.common.controller.BaseController;
 import com.panzhihua.common.model.dtos.community.ActivityInviteDTO;
 import com.panzhihua.common.model.dtos.community.PageActivityInviteDTO;
 import com.panzhihua.common.model.dtos.property.CommonPage;
@@ -18,6 +19,7 @@
 import com.panzhihua.service_community.dao.ComActActEvaluateDAO;
 import com.panzhihua.service_community.model.dos.*;
 import com.panzhihua.service_community.service.*;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
 import org.springframework.beans.BeanUtils;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.ObjectUtils;
@@ -100,7 +102,7 @@
 @Slf4j
 @RestController
 @RequestMapping("/")
-public class CommunityApi {
+public class CommunityApi extends BaseController {
     @Resource
     public ComMngPopulationDAO comMngPopulationDAO;
     @Resource
@@ -151,6 +153,10 @@
     private ComActActEvaluateDAO comActActEvaluateDAO;
     @Resource
     private ComActActivityInviteService comActActivityInviteService;
+    @Resource
+    private RabbitTemplate rabbitTemplate;
+    @Resource
+    private AutomessageSysUserService automessageSysUserService;
 
     /**
      * 新增社区活动
@@ -634,6 +640,10 @@
         BeanUtils.copyProperties(comActDynVO, comActDynDO);
         boolean save = comActDynService.save(comActDynDO);
         if (save) {
+            if(comActDynVO.getCategory()!=null&&comActDynVO.getCategory()==4){
+                comActDynVO.setId(comActDynDO.getId());
+                rabbitTemplate.convertAndSend("huacheng.acid.message.exchange", "huacheng.acid.message.key", comActDynVO);
+            }
             // 最多只能设置三条置顶状态,后边设置会取消先前设置的置顶
             Integer isTopping = comActDynVO.getIsTopping();
             boolean b = isTopping.intValue() == 1;
@@ -2325,7 +2335,7 @@
      */
     @GetMapping("/eventgrid/community/list")
     public R getCommunityLists() {
-        return comActService.getCommunityLists();
+        return comActService.getCommunityLists(this.getAppId());
     }
 
     /**
@@ -2678,4 +2688,25 @@
     public R activityInviteDelete(@RequestParam("id") Long id) {
         return comActActivityInviteService.activityInviteDelete(id);
     }
+
+    /**
+     * 根据id查询重复的社区id集合
+     * @param id
+     * @return
+     */
+    @GetMapping("selectCommunityIds")
+    public R selectCommunityIds(@RequestParam("id") Long id){
+        return comActService.selectIds(id);
+    }
+
+
+    /**
+     * 通过id查询用户
+     * @param id
+     * @return
+     */
+    @GetMapping("selectAutomessageSysUserById")
+    public R selectAutomessageSysUserById(@RequestParam("id") Long id){
+        return automessageSysUserService.selectAutomessageSysUserById(id);
+    }
 }

--
Gitblit v1.7.1