From 7d0310cafba32916c055ac0d04fef6b6c02c6eb7 Mon Sep 17 00:00:00 2001
From: 张天森 <1292933220@qq.com>
Date: 星期二, 11 十月 2022 11:27:33 +0800
Subject: [PATCH] update
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java | 12 ++++++++++--
1 files changed, 10 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..1adaf19 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,8 @@
private ComActActEvaluateDAO comActActEvaluateDAO;
@Resource
private ComActActivityInviteService comActActivityInviteService;
+ @Resource
+ private RabbitTemplate rabbitTemplate;
/**
* 新增社区活动
@@ -634,6 +638,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 +2333,7 @@
*/
@GetMapping("/eventgrid/community/list")
public R getCommunityLists() {
- return comActService.getCommunityLists();
+ return comActService.getCommunityLists(this.getAppId());
}
/**
--
Gitblit v1.7.1