From 8d5fb4ee9d27fd6a61b210eaee74af265f76aa7c Mon Sep 17 00:00:00 2001 From: manailin <261030956@qq.com> Date: 星期五, 08 四月 2022 14:55:18 +0800 Subject: [PATCH] [修改]修改配置 --- 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