101captain
2022-03-16 25d1b9483fd75fe21e60b03ad9f3c9c3e281d23c
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -473,6 +473,9 @@
        if (isNull(actActivityDO)) {
            return R.fail("活动不存在");
        }
        if(actActivityDO.getSignUpBegin().after(new Date())){
            return R.fail("未到报名时间");
        }
        int num = 0;
        ComActActSignDO comActActSignDO = comActActSignDAO.selectOne(new QueryWrapper<ComActActSignDO>()
                .lambda().eq(ComActActSignDO::getActivityId, activityId).eq(ComActActSignDO::getUserId, userId));
@@ -546,12 +549,14 @@
                comActActSignDO.setCreateAt(new Date());
                comActActSignDO.setReason(null);
                comActActSignDO.setIsVolunteer(isVolunteer);
                comActActSignDO.setTimes(comActActSignDO.getTimes()+1);
                num = comActActSignDAO.updateById(comActActSignDO);
            } else {
                comActActSignDO = new ComActActSignDO();
                comActActSignDO.setActivityId(activityId);
                comActActSignDO.setUserId(userId);
                comActActSignDO.setIsVolunteer(isVolunteer);
                comActActSignDO.setTimes(1);
                num = comActActSignDAO.insert(comActActSignDO);
            }
        } else {
@@ -971,7 +976,7 @@
                }
                comActActRegistDO.setActivityId(activityId);
                comActActRegistDO.setStartTime(new Date());
                comActActRegistDO.setType(1);
                comActActRegistDO.setType(comActActivityDO.getType());
                comActActRegistDO.setUserId(userId);
                comActActRegistDO.setIsVolunteer(comActActSignDO.getIsVolunteer());
                comActActRegistDO.setCreateAt(nowDate);
@@ -980,7 +985,7 @@
                comActActRegistDO.setPosition(comActActRegistVO.getPosition());
                comActActRegistDO.setTimes(signAllCount+1);
                int result = comActActRegistDAO.insert(comActActRegistDO);
                if (result > 0&&comActActRegistDO.getType()==1&&comActActivityDO.getType()!=3) {
                if (result > 0&&comActActivityDO.getType()!=3) {
                    if (isHave) {
                        boolean isVolunteerAct = comActActivityDO.getVolunteerMax() != 0;
                        AddComActIntegralUserDTO addComActIntegralUserDTO=new AddComActIntegralUserDTO();