From ada9d2e3f734582a0d9ae8c00a936d8c8ed669d7 Mon Sep 17 00:00:00 2001
From: huanghongfa <18228131219@163.com>
Date: 星期五, 15 一月 2021 13:51:44 +0800
Subject: [PATCH] 微心愿详情bug

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 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 0577321..a8fe9d1 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
@@ -6,6 +6,7 @@
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.panzhihua.common.model.vos.R;
 import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO;
+import com.panzhihua.common.model.vos.community.TodoEventsVO;
 import com.panzhihua.service_community.dao.ComActEasyPhotoDAO;
 import com.panzhihua.service_community.dao.ComActEasyPhotoUserDAO;
 import com.panzhihua.service_community.model.dos.ComActEasyPhotoDO;
@@ -155,26 +156,29 @@
 //        操作类型 1审核通过 2驳回  3反馈
         ComActEasyPhotoDO cmActEasyPhotoDO=new ComActEasyPhotoDO();
         cmActEasyPhotoDO.setId(comActEasyPhotoVO.getId());
-        int isNeedFeedBack = comActEasyPhotoVO.getIsNeedFeedBack().intValue();
+        cmActEasyPhotoDO.setHandlerId(comActEasyPhotoVO.getUserId());
+        Date date = new Date();
         switch (type){
             case 1:
+                int isNeedFeedBack = comActEasyPhotoVO.getIsNeedFeedBack().intValue();
                 if (isNeedFeedBack==1) {
                     cmActEasyPhotoDO.setStatus(2);//进行中
+                    cmActEasyPhotoDO.setIsNeedFeedBack(1);
                 }else{
                     cmActEasyPhotoDO.setStatus(4);//已完成
                 }
-                cmActEasyPhotoDO.setExamineAt(new Date());
+                cmActEasyPhotoDO.setExamineAt(date);
                 break;
             case 2:
                 cmActEasyPhotoDO.setStatus(3);//已驳回
-                cmActEasyPhotoDO.setExamineAt(new Date());
+                cmActEasyPhotoDO.setExamineAt(date);
                 cmActEasyPhotoDO.setRejectReason(comActEasyPhotoVO.getRejectReason());
                 break;
             case 3:
                 cmActEasyPhotoDO.setHandleResult(comActEasyPhotoVO.getHandleResult());
                 cmActEasyPhotoDO.setHandlePhotoList(comActEasyPhotoVO.getHandlePhotoList());
                 cmActEasyPhotoDO.setStatus(4);//已完成
-                cmActEasyPhotoDO.setFeedbackAt(new Date());
+                cmActEasyPhotoDO.setFeedbackAt(date);
                 break;
             default:break;
         }
@@ -184,4 +188,17 @@
         }
         return R.fail();
     }
+
+    /**
+     * 随手拍是否有待审核和带反馈的事件
+     *
+     * @param communityId 社区id
+     * @param userId      登录用户id
+     * @return 待处理事件集合
+     */
+    @Override
+    public List<TodoEventsVO> selectNeedToDo(Long communityId, Long userId) {
+        List<TodoEventsVO> todoEventsVOS=comActEasyPhotoDAO.selectNeedToDo(communityId,userId);
+        return todoEventsVOS;
+    }
 }

--
Gitblit v1.7.1