From 342757cba6c54dc315be93c94a13a8f30c1e2591 Mon Sep 17 00:00:00 2001
From: tangxiaobao <303826152@qq.com>
Date: 星期五, 23 七月 2021 16:20:27 +0800
Subject: [PATCH] 社区后台基础数据库bug修改
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java | 27 +++++++++++++++++++++++++--
1 files changed, 25 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 830d97a..6f50b96 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
@@ -133,10 +133,13 @@
Date nowDate = DateUtils.getCurrentDate(DateUtils.ymdhms_format);
List<ComActEasyPhotoActivityDO> photoActivityDOS = comActEasyPhotoActivityMapper.selectList(
new QueryWrapper<ComActEasyPhotoActivityDO>().lambda().eq(ComActEasyPhotoActivityDO::getCommunityId,comActEasyPhotoVO.getCommunityId())
- .le(ComActEasyPhotoActivityDO::getActivityStartAt,nowDate).ge(ComActEasyPhotoActivityDO::getActivityEndAt,nowDate));
+ .le(ComActEasyPhotoActivityDO::getActivityStartAt,nowDate).ge(ComActEasyPhotoActivityDO::getActivityEndAt,nowDate)
+ .eq(ComActEasyPhotoActivityDO::getStatus,ComActEasyPhotoActivityDO.status.jxz));
if(!photoActivityDOS.isEmpty()){
ComActEasyPhotoActivityDO photoActivityDO = photoActivityDOS.get(0);
+ photoActivityDO.setCount(photoActivityDO.getCount() + 1);
comActEasyPhotoDO.setActivityId(photoActivityDO.getId());
+ comActEasyPhotoActivityMapper.updateById(photoActivityDO);
}
int insert = comActEasyPhotoDAO.insert(comActEasyPhotoDO);
if (insert>0) {
@@ -198,6 +201,10 @@
Date date = new Date();
switch (type){
case 1:
+ cmActEasyPhotoDO = this.comActEasyPhotoDAO.selectById(comActEasyPhotoVO.getId());
+ if(!cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.dsh)){
+ return R.fail("该随手拍已审核,不可重复操作");
+ }
Integer isNeedFeedBack = comActEasyPhotoVO.getIsNeedFeedBack();
if (isNeedFeedBack==1) {
cmActEasyPhotoDO.setStatus(2);//进行中
@@ -210,11 +217,19 @@
comActUserWalletService.examineAddMoney(comActEasyPhotoVO.getActivityType(),comActEasyPhotoVO.getId(),comActEasyPhotoVO.getUserId());
break;
case 2:
+ cmActEasyPhotoDO = this.comActEasyPhotoDAO.selectById(comActEasyPhotoVO.getId());
+ if(!cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.dsh)){
+ return R.fail("该随手拍已审核,不可重复操作");
+ }
cmActEasyPhotoDO.setStatus(3);//已驳回
cmActEasyPhotoDO.setExamineAt(date);
cmActEasyPhotoDO.setRejectReason(comActEasyPhotoVO.getRejectReason());
break;
case 3:
+ cmActEasyPhotoDO = this.comActEasyPhotoDAO.selectById(comActEasyPhotoVO.getId());
+ if(!cmActEasyPhotoDO.getStatus().equals(ComActEasyPhotoDO.status.dfk)){
+ return R.fail("该随手拍不是待反馈状态,不可进行反馈");
+ }
cmActEasyPhotoDO.setHandleResult(comActEasyPhotoVO.getHandleResult());
cmActEasyPhotoDO.setHandlePhotoList(comActEasyPhotoVO.getHandlePhotoList());
cmActEasyPhotoDO.setStatus(4);//已完成
@@ -382,7 +397,15 @@
return R.fail();
}
-
+ /**
+ * 社区随手拍列表统计
+ * @param communityId 社区id
+ * @return 统计结果
+ */
+ @Override
+ public R easyPhotoStatistics(Long communityId){
+ return R.ok(this.baseMapper.getEasyPhotoStatistics(communityId));
+ }
}
--
Gitblit v1.7.1