From 13515d9f2852e068951d20e6655bf9a19badb38d Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期四, 05 五月 2022 15:15:58 +0800
Subject: [PATCH] 花城E+防疫修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java |   73 ++++++++++++++++++++++++++++++------
 1 files changed, 60 insertions(+), 13 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 6869959..9de2870 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
@@ -79,18 +79,18 @@
      */
     @Override
     public R pageNeighborByApp(ComActNeighborCircleAppDTO neighborCircleAppDTO) {
-        if(neighborCircleAppDTO.getCommunityId()==0L){
-            R<LoginUserInfoVO> loginUserInfoVOR=userService.getUserInfoByUserId(neighborCircleAppDTO.getUserId().toString());
-            if(R.isOk(loginUserInfoVOR)){
-                LoginUserInfoVO loginUserInfoVO=loginUserInfoVOR.getData();
-                if(loginUserInfoVO!=null){
-                 ComPbMemberDO comPbMemberDO=comPbMemberDAO.selectOne(new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getIdCard,loginUserInfoVO.getIdCard()));
-                 if(comPbMemberDO!=null){
-                     neighborCircleAppDTO.setCommunityId(comPbMemberDO.getCommunityId());
-                 }
-                }
-            }
-        }
+//        if(neighborCircleAppDTO.getCommunityId()==0L){
+//            R<LoginUserInfoVO> loginUserInfoVOR=userService.getUserInfoByUserId(neighborCircleAppDTO.getUserId().toString());
+//            if(R.isOk(loginUserInfoVOR)){
+//                LoginUserInfoVO loginUserInfoVO=loginUserInfoVOR.getData();
+//                if(loginUserInfoVO!=null){
+//                 ComPbMemberDO comPbMemberDO=comPbMemberDAO.selectOne(new QueryWrapper<ComPbMemberDO>().lambda().eq(ComPbMemberDO::getIdCard,loginUserInfoVO.getIdCard()));
+//                 if(comPbMemberDO!=null){
+//                     neighborCircleAppDTO.setCommunityId(comPbMemberDO.getCommunityId());
+//                 }
+//                }
+//            }
+//        }
         Page userPage = new Page(neighborCircleAppDTO.getPageNum(), neighborCircleAppDTO.getPageSize());
         IPage<ComActNeighborCircleAppVO> doPager = this.baseMapper.pageNeighborByApp(userPage, neighborCircleAppDTO);
         if (!doPager.getRecords().isEmpty()) {
@@ -104,6 +104,39 @@
                             .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);
+    }
+
+    @Override
+    public R selectSolve(ComActNeighborCircleAppDTO neighborCircleAppDTO) {
+        IPage<ComActNeighborCircleAppVO> doPager=this.baseMapper.selectSolve(new Page<ComActNeighborCircleDO>(neighborCircleAppDTO.getPageNum(),neighborCircleAppDTO.getPageSize()),neighborCircleAppDTO);
+        if (!doPager.getRecords().isEmpty()) {
+            for (ComActNeighborCircleAppVO circleAppVO : doPager.getRecords()) {
+                if (neighborCircleAppDTO.getSolveId() != 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 {
@@ -656,7 +689,8 @@
 
     @Override
     public R detailNeighborByAdmin(Long id) {
-        ComActNeighborCircleDO comActNeighborCircleDO = this.baseMapper.selectById(id);
+        ComActNeighborCircleDetailAppVO comActNeighborCircleDO =
+                this.baseMapper.neighborDetailByApp(id);
         if (comActNeighborCircleDO == null) {
             return R.fail("id有误");
         }
@@ -925,4 +959,17 @@
         }
         return R.fail();
     }
+
+    @Override
+    public R orderAndSolve(EditNeighborCircleAdminVO editNeighborCircleAdminVO) {
+        ComActNeighborCircleDO comActNeighborCircleDO=new ComActNeighborCircleDO();
+        BeanUtils.copyProperties(editNeighborCircleAdminVO,comActNeighborCircleDO);
+        if(comActNeighborCircleDO.getSolveStatus()!=null){
+            comActNeighborCircleDO.setSolveTime(new Date());
+        }
+        if(comActNeighborCircleDO.getOrderStatus()!=null){
+            comActNeighborCircleDO.setOrderTime(new Date());
+        }
+        return R.ok(this.baseMapper.updateById(comActNeighborCircleDO));
+    }
 }

--
Gitblit v1.7.1