From 7bfa6a85ad6a6c537b0f7ddb9f6a8795c8e8c866 Mon Sep 17 00:00:00 2001
From: puhanshu <a9236326>
Date: 星期四, 09 六月 2022 16:44:24 +0800
Subject: [PATCH] 五社&社区企业&人大代表

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectPublicityServiceImpl.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectPublicityServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectPublicityServiceImpl.java
index b1f6423..bb6d38a 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectPublicityServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialProjectPublicityServiceImpl.java
@@ -4,13 +4,17 @@
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.panzhihua.common.model.dtos.property.CommonPage;
 import com.panzhihua.common.model.vos.R;
+import com.panzhihua.service_community.dao.ComActDAO;
 import com.panzhihua.service_community.entity.ComActSocialProjectPublicity;
 import com.panzhihua.service_community.dao.ComActSocialProjectPublicityDao;
+import com.panzhihua.service_community.model.dos.ComActDO;
 import com.panzhihua.service_community.service.ComActSocialProjectPublicityService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+
+import static java.util.Objects.nonNull;
 
 /**
  * 项目宣传表(ComActSocialProjectPublicity)表服务实现类
@@ -24,8 +28,16 @@
 
     @Resource
     private ComActSocialProjectPublicityDao comActSocialProjectPublicityDao;
+    @Resource
+    private ComActDAO comActDAO;
     @Override
     public R pageList(CommonPage commonPage) {
+        if (nonNull(commonPage.getCommunityId())) {
+            ComActDO comActDO = comActDAO.selectById(commonPage.getCommunityId());
+            if (nonNull(comActDO)) {
+                commonPage.setStreetId(comActDO.getStreetId());
+            }
+        }
         return R.ok(comActSocialProjectPublicityDao.pageList(new Page(commonPage.getPage(),commonPage.getSize()),commonPage));
     }
 

--
Gitblit v1.7.1