From 63b224f484539f7df68d90700596dbd4a8d18734 Mon Sep 17 00:00:00 2001
From: 101captain <237651143@qq.com>
Date: 星期一, 08 八月 2022 10:15:58 +0800
Subject: [PATCH] Merge branch 'huacheng_test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into huacheng_test

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActEvaluateServiceImpl.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 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 88b3882..f88f293 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
@@ -68,6 +68,12 @@
         if (isNull(comActActivityDO)) {
             return R.fail("活动不存在");
         }
+        ComActActSignDO comActActSignDO = comActActSignDAO
+                .selectOne(new QueryWrapper<ComActActSignDO>().lambda().eq(ComActActSignDO::getActivityId, activityId)
+                        .eq(ComActActSignDO::getUserId, userId).eq(ComActActSignDO::getStatus, 1));
+        if (isNull(comActActSignDO)) {
+            return R.fail("活动未报名");
+        }
         Date beginAt = comActActivityDO.getBeginAt();
         Date nowDate = new Date();
         Integer isQrCode = comActActivityDO.getIsQrCode();
@@ -88,6 +94,7 @@
         }
         ComActActEvaluateDO comActActEvaluateDO = new ComActActEvaluateDO();
         BeanUtils.copyProperties(comActActEvaluateVO, comActActEvaluateDO);
+        comActActEvaluateDO.setSignIdentity(comActActSignDO.getSignIdentity());
         int result = this.baseMapper.insert(comActActEvaluateDO);
         if (result < 0) {
             return R.fail("评论失败,请重试");
@@ -114,7 +121,7 @@
                 List<ComActActEvaluateDO> comActActEvaluateDOList = comActActSignDOS.stream().map(comActActSignDO -> {
                     ComActActEvaluateDO comActActEvaluateDO = new ComActActEvaluateDO();
                     comActActEvaluateDO.setActivityId(comActActSignDO.getActivityId());
-                    comActActEvaluateDO.setIsVolunteer(comActActSignDO.getIsVolunteer());
+                    comActActEvaluateDO.setSignIdentity(comActActSignDO.getSignIdentity());
                     comActActEvaluateDO.setUserId(comActActSignDO.getUserId());
                     comActActEvaluateDO.setCreateAt(new Date());
                     comActActEvaluateDO.setStarLevel(5);

--
Gitblit v1.7.1