From 00a59b93c16b24e7be77c6f1ce4866c75a2e0431 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期二, 19 四月 2022 16:32:21 +0800
Subject: [PATCH] 花城E+防疫修改

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
index 9f267de..cdd0400 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
@@ -81,6 +81,8 @@
     private ComActEasyPhotoHandlerService easyPhotoHandlerService;
     @Resource
     private ComActEasyPhotoEvaluateMapper comActEasyPhotoEvaluateMapper;
+    @Resource
+    private ComActReserveRecordMapper comActReserveRecordMapper;
     /**
      * 分页查询随手拍
      *
@@ -307,7 +309,6 @@
                 } else {
                     cmActEasyPhotoDO.setIsReportUrban(ComActEasyPhotoVO.isReportUrban.no);
                 }
-                cmActEasyPhotoDO.setHandlerId(comActEasyPhotoVO.getHandlerId());
                 cmActEasyPhotoDO.setExamineAt(nowDate);
                 cmActEasyPhotoDO.setActivityType(comActEasyPhotoVO.getActivityType());
                 if (StringUtils.isNotEmpty(comActEasyPhotoVO.getHandleResult())
@@ -328,7 +329,8 @@
                 //添加分配人员
                 if(comActEasyPhotoVO.getHandleList() != null && comActEasyPhotoVO.getHandleList().size() > 0){
                     comActEasyPhotoVO.getHandleList().forEach(handle -> {
-                        easyPhotoHandlerService.addHandleRecord(cmActEasyPhotoDO.getCommunityId(),comActEasyPhotoVO.getUserId()
+                        cmActEasyPhotoDO.setHandlerId(handle.getUserId());
+                        easyPhotoHandlerService.addHandleRecord(cmActEasyPhotoDO.getCommunityId(),handle.getUserId()
                                 ,cmActEasyPhotoDO.getId(),handle.getType(), ComActEasyPhotoHandler.ServiceType.SSP,comActEasyPhotoVO.getSponsorId());
                     });
                 }
@@ -716,6 +718,15 @@
         //查询社区正在进行中的应用预约/登记列表
         List<ComActReserveIndexVo> comActReserveIndexApplicationVos=comActReserveMapper.indexApplication(communityId);
         if(!comActReserveIndexApplicationVos.isEmpty()){
+            comActReserveIndexApplicationVos.forEach(comActReserveIndexVo -> {
+               Integer count=comActReserveRecordMapper.selectCount(new QueryWrapper<ComActReserveRecordDO>().lambda().eq(ComActReserveRecordDO::getReserveId,comActReserveIndexVo.getId()).eq(ComActReserveRecordDO::getUserId,userId));
+               if(count>0){
+                   comActReserveIndexVo.setIsCommit(1);
+               }
+               else {
+                   comActReserveIndexVo.setIsCommit(2);
+               }
+            });
             easyPhotoRewardVO.setComActReserveIndexApplicationVos(comActReserveIndexApplicationVos);
         }
         //查询banner

--
Gitblit v1.7.1