From 26cb89646ebc77ba83ffd0e2d135793778b8877e Mon Sep 17 00:00:00 2001
From: puhanshu <a9236326>
Date: 星期五, 05 八月 2022 16:33:30 +0800
Subject: [PATCH] bug修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 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 191f273..06f2c06 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
@@ -1203,6 +1203,43 @@
     }
 
     /**
+     * 分页查询可关联清单列表
+     * @param neighborCircleAppDTO
+     * @return
+     */
+    @Override
+    public R pageRelationList(ComActNeighborCircleAppDTO neighborCircleAppDTO) {
+        Page userPage = new Page(neighborCircleAppDTO.getPageNum(), neighborCircleAppDTO.getPageSize());
+        IPage<ComActNeighborCircleAppVO> doPager = this.baseMapper.pageRelationList(userPage, neighborCircleAppDTO);
+        if (!doPager.getRecords().isEmpty()) {
+            for (ComActNeighborCircleAppVO circleAppVO : doPager.getRecords()) {
+                if (neighborCircleAppDTO.getUserId() != null) {
+                    // 查询点赞信息
+                    ComActNeighborCircleFabulousDO circleFabulousDO =
+                            comActNeighborCircleFabulousDAO.selectOne(new QueryWrapper<ComActNeighborCircleFabulousDO>()
+                                    .lambda().eq(ComActNeighborCircleFabulousDO::getParentId, circleAppVO.getId())
+                                    .eq(ComActNeighborCircleFabulousDO::getUserId, neighborCircleAppDTO.getUserId())
+                                    .eq(ComActNeighborCircleFabulousDO::getType, ComActNeighborCircleFabulousDO.type.llq)
+                                    .eq(ComActNeighborCircleFabulousDO::getIsEffective,
+                                            ComActNeighborCircleFabulousDO.isEffective.yes));
+                    if (circleFabulousDO != null) {
+                        circleAppVO.setHaveSign(1);
+                    } else {
+                        circleAppVO.setHaveSign(2);
+                    }
+                }
+                if (circleAppVO.getType() != null && circleAppVO.getType().equals(ComActNeighborCircleDO.type.admin)) {
+                    ComActDO actDO = comActDAO.selectById(circleAppVO.getCommunityId());
+                    if (actDO != null) {
+                        circleAppVO.setName(actDO.getName());
+                    }
+                }
+            }
+        }
+        return R.ok(doPager);
+    }
+
+    /**
      * 判断活动统计列表中是否已有该单位的数据
      * */
     public Map<String,Integer> alreadyAnalysis(Long unitId,List<UnitActivityAnalysisVO> list){

--
Gitblit v1.7.1