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

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 51 insertions(+), 2 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 0277595..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
@@ -10,6 +10,7 @@
 import com.panzhihua.common.model.vos.LoginUserInfoVO;
 import com.panzhihua.common.model.vos.PageVO;
 import com.panzhihua.common.service.user.UserService;
+import com.panzhihua.common.utlis.SensitiveUtil;
 import com.panzhihua.service_community.entity.ComPbCheckUnit;
 import com.panzhihua.service_community.service.ComActNeighborCircleTopicService;
 import org.apache.commons.lang3.ObjectUtils;
@@ -36,6 +37,7 @@
 
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.annotation.RequestParam;
 
 /**
  * @auther lyq
@@ -242,7 +244,7 @@
         if(circleDetailAppVO.getOrderType()!=null){
             if(circleDetailAppVO.getOrderType()==2){
                 AdministratorsUserVO user1 = this.baseMapper.selectUserByUserId(circleDetailAppVO.getSolveId());
-                circleDetailAppVO.setSolveName(user1.getName());
+                circleDetailAppVO.setSolveName(SensitiveUtil.replaceName(user1.getName()));
             }
             if(circleDetailAppVO.getOrderType()==1){
                 ComPbCheckUnit comPbCheckUnit=comPbCheckUnitDao.selectById(circleDetailAppVO.getSolveUnitId());
@@ -267,7 +269,12 @@
                 circleDetailAppVO.setHaveSign(2);
             }
         }
-
+        ComActActivityDO comActActivityDO=comActActivityDAO.selectOne(new QueryWrapper<ComActActivityDO>().lambda().eq(ComActActivityDO::getRelationId,neighborCircleAppDTO.getCircleId()));
+        if(comActActivityDO!=null){
+            circleDetailAppVO.setActivityDate(comActActivityDO.getCreateAt());
+            circleDetailAppVO.setActivityId(comActActivityDO.getId());
+            circleDetailAppVO.setActivityName(comActActivityDO.getActivityName());
+        }
         // 查询邻里圈下评论列表
         IPage<ComActNeighborCircleCommentAppVO> circleCommentAppPage =
             comActNeighborCircleCommentDAO.pageNeighborCommentByApp(
@@ -1190,6 +1197,48 @@
         return null;
     }
 
+    @Override
+    public R selectCount(Integer type, String phone,Long communityId) {
+        return R.ok(this.baseMapper.selectCount(type,phone,communityId));
+    }
+
+    /**
+     * 分页查询可关联清单列表
+     * @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);
+    }
+
     /**
      * 判断活动统计列表中是否已有该单位的数据
      * */

--
Gitblit v1.7.1