101captain
2021-12-23 5a8a90c095280fbd2106869ecd2bad10e01a57a6
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("未签到,不能评价");
            }