From 5b571c0e9be4363f7461f234fb4a643b2d50277d Mon Sep 17 00:00:00 2001
From: 张天森 <1292933220@qq.com>
Date: 星期二, 15 十一月 2022 13:41:10 +0800
Subject: [PATCH] 三说会堂事件后台更新
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
index 003f0db..59c943d 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -1,5 +1,7 @@
package com.panzhihua.service_community.service.impl;
+import cn.hutool.core.collection.ListUtil;
+import cn.hutool.core.util.PageUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.util.PageUtil;
@@ -99,6 +101,15 @@
// }
// }
// }
+ Long communityId = neighborCircleAppDTO.getCommunityId();
+ if(null != communityId){
+ List<Long> communityIds = comActDAO.selectIds(communityId);
+ if (CollUtil.isEmpty(communityIds)) {
+ communityIds = new ArrayList<>();
+ communityIds.add(communityId);
+ }
+ neighborCircleAppDTO.setCommunityIds(communityIds);
+ }
Page userPage = new Page(neighborCircleAppDTO.getPageNum(), neighborCircleAppDTO.getPageSize());
IPage<ComActNeighborCircleAppVO> doPager = this.baseMapper.pageNeighborByApp(userPage, neighborCircleAppDTO);
if (!doPager.getRecords().isEmpty()) {
@@ -334,13 +345,14 @@
@Override
public R pageNeighborByAdmin(ComActNeighborCircleAdminDTO neighborCircleAdminDTO) {
Long communityId = neighborCircleAdminDTO.getCommunityId();
- List<Long> communityIds = comActDAO.selectIds(communityId);
- if (CollUtil.isEmpty(communityIds)) {
- communityIds = new ArrayList<>();
- communityIds.add(communityId);
+ if(null != communityId){
+ List<Long> communityIds = comActDAO.selectIds(communityId);
+ if (CollUtil.isEmpty(communityIds)) {
+ communityIds = new ArrayList<>();
+ communityIds.add(communityId);
+ }
+ neighborCircleAdminDTO.setCommunityIds(communityIds);
}
- neighborCircleAdminDTO.setCommunityIds(communityIds);
-
Page page = new Page(neighborCircleAdminDTO.getPageNum(), neighborCircleAdminDTO.getPageSize());
IPage<ComActNeighborCircleAdminVO> doPager = this.baseMapper.pageNeighborByAdmin(page, neighborCircleAdminDTO);
doPager.getRecords().forEach(data -> {
--
Gitblit v1.7.1