From 4c80d2017a3b88b9ad55f28c3b87fd96eb67bcb2 Mon Sep 17 00:00:00 2001
From: 张天森 <1292933220@qq.com>
Date: 星期四, 29 九月 2022 09:40:51 +0800
Subject: [PATCH] Merge branch 'sanshuohuitang_dev' into huacheng_test

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java |    7 +++++++
 1 files changed, 7 insertions(+), 0 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..066bcf7 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
@@ -18,6 +18,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;
@@ -151,6 +152,8 @@
     private ComActActEvaluateDAO comActActEvaluateDAO;
     @Resource
     private ComActActivityInviteService comActActivityInviteService;
+    @Resource
+    private RabbitTemplate rabbitTemplate;
 
     /**
      * 新增社区活动
@@ -634,6 +637,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;

--
Gitblit v1.7.1