From e3aaacbccfe7aa6f99e3f116138efd9499abe7a5 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期二, 14 六月 2022 10:27:56 +0800
Subject: [PATCH] bug修改
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActEvaluateServiceImpl.java | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActEvaluateServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActEvaluateServiceImpl.java
index 93d0ee7..88b3882 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActEvaluateServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActEvaluateServiceImpl.java
@@ -170,22 +170,13 @@
if (isNull(comActActivityDO)) {
return R.fail("活动不存在");
}
- List<ComActActEvaluateDO> comActActEvaluateDOList = this.baseMapper.selectList(new QueryWrapper<ComActActEvaluateDO>()
- .lambda().eq(ComActActEvaluateDO::getUserId, userId).eq(ComActActEvaluateDO::getActivityId, activityId));
- List<ComActActEvaluateVO> comActActEvaluateVOS = new ArrayList<>();
- if (!ObjectUtils.isEmpty(comActActEvaluateDOList)) {
- comActActEvaluateDOList.forEach(comActActEvaluateDO -> {
- ComActActEvaluateVO comActActEvaluateVO = new ComActActEvaluateVO();
- BeanUtils.copyProperties(comActActEvaluateDO, comActActEvaluateVO);
- comActActEvaluateVOS.add(comActActEvaluateVO);
- });
- }
- int registCount = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>()
+ List<ComActActEvaluateVO> comActActEvaluateVOS = this.baseMapper.selectEvaluateList(activityId, userId);
+ int regCount = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>()
.lambda().eq(ComActActRegistDO::getActivityId, activityId).eq(ComActActRegistDO::getUserId, userId));
MyActivityEvaluateVO evaluateVO = new MyActivityEvaluateVO();
evaluateVO.setMyEvaluateList(comActActEvaluateVOS);
- boolean needDisplay = registCount > comActActEvaluateVOS.size() &&
+ boolean needDisplay = regCount > comActActEvaluateVOS.size() &&
new Date().before(DateUtils.addDays(comActActivityDO.getEndAt(), 3));
evaluateVO.setIsDisplay(needDisplay ? 1 : 0);
return R.ok(evaluateVO);
--
Gitblit v1.7.1