puhanshu
2021-09-13 8314322a6d6daa5a6bb452bfd54aef25f9240206
修改活动评价bug
1个文件已修改
10 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActEvaluateServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActEvaluateServiceImpl.java
@@ -22,9 +22,11 @@
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActActEvaluateVO;
import com.panzhihua.service_community.dao.ComActActEvaluateDAO;
import com.panzhihua.service_community.dao.ComActActRegistDAO;
import com.panzhihua.service_community.dao.ComActActSignDAO;
import com.panzhihua.service_community.dao.ComActActivityDAO;
import com.panzhihua.service_community.model.dos.ComActActEvaluateDO;
import com.panzhihua.service_community.model.dos.ComActActRegistDO;
import com.panzhihua.service_community.model.dos.ComActActSignDO;
import com.panzhihua.service_community.model.dos.ComActActivityDO;
import com.panzhihua.service_community.service.ComActActEvaluateService;
@@ -47,6 +49,8 @@
    private ComActActivityDAO comActActivityDAO;
    @Resource
    private ComActActSignDAO comActActSignDAO;
    @Resource
    private ComActActRegistDAO comActActRegistDAO;
    /**
     * 社区活动评价
     *
@@ -69,9 +73,9 @@
        Integer isQrCode = comActActivityDO.getIsQrCode();
        if (nonNull(isQrCode) && isQrCode.equals(1)) {
            //需要签到类型
            int signCount = comActActSignDAO.selectCount(new QueryWrapper<ComActActSignDO>()
                    .lambda().eq(ComActActSignDO::getUserId, userId).eq(ComActActSignDO::getActivityId, activityId));
            if (signCount <= 0) {
            int registCount = comActActRegistDAO.selectCount(new QueryWrapper<ComActActRegistDO>()
                    .lambda().eq(ComActActRegistDO::getUserId, userId).eq(ComActActRegistDO::getActivityId, activityId));
            if (registCount <= 0) {
                //未签到,不能评价
                return R.fail("未签到,不能评价");
            }