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 | 28 +++++++++++++++++++++++-----
1 files changed, 23 insertions(+), 5 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 d6101b3..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;
@@ -78,7 +79,7 @@
@Override
public R detailEasyPhoto(Long id, Long userId) {
ComActEasyPhotoVO comActEasyPhotoVO=comActEasyPhotoDAO.detailEasyPhoto(id);
- if (ObjectUtils.isEmpty(comActEasyPhotoVO)) {
+ if (ObjectUtils.isEmpty(comActEasyPhotoVO)||null==comActEasyPhotoVO.getStatus()) {
return R.fail("随手拍不存在");
}
ComActEasyPhotoUserDO comActEasyPhotoUserDO = comActEasyPhotoUserDAO.selectOne(new QueryWrapper<ComActEasyPhotoUserDO>().lambda().eq(ComActEasyPhotoUserDO::getEasyPhotoId, id).eq(ComActEasyPhotoUserDO::getUserId, userId));
@@ -155,25 +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;
}
@@ -183,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