diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java index a13c2bed23..96e45bad87 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/ActConstant.java @@ -88,14 +88,30 @@ public interface ActConstant { */ String ACT_USER_STATUS_CANCELD="canceld"; - /*操作类型(已报名/待审核auditing, + /** + * (5)act_user_relation表的REWARD_FLAG:给积分agree + */ + String ACT_USER_STATUS_AGREE="agree"; + + /** + * (6)act_user_relation表的REWARD_FLAG:不给积分deny + */ + String ACT_USER_STATUS_DENY="deny"; + + /** + * (7)act_user_relation表的SIGN_IN_FLAG:已签到 + */ + String ACT_USER_STATUS_SIGNED_IN="signed_in"; + + /*act_user_log表:操作类型( + 已报名/待审核auditing, 审核通过passed, 审核不通过refused 取消报名canceld, 已签到signedin - 发放积分rewarded + 发放积分rewarded 拒绝发放积分refuse_reward - 重新处理processing + 重新处理processing )*/ String ACT_USER_LOG_OPER_AUDITING="auditing"; String ACT_USER_LOG_OPER_PASSED="passed"; @@ -111,4 +127,39 @@ public interface ActConstant { */ String PASSEDTYPE_AUTO="auto"; String PASSEDTYPE_MANUAL="manual"; + + /** + * (1)用户活动页面按钮控制:我要报名 + */ + String CURRENT_STATUS_USER_SIGN_UP = "sign_up"; + + /** + * (2)用户活动页面按钮控制:已报满 + */ + String CURRENT_STATUS_USER_ENOUGH = "enough"; + + /** + * (3)用户活动页面按钮控制:截止报名 + */ + String CURRENT_STATUS_USER_END_SIGN_UP = "end_sign_up"; + + /** + * (4)用户活动页面按钮控制:已开始 + */ + String CURRENT_STATUS_USER_IN_PROGRESS = "in_progress"; + + /** + * (5)用户活动页面按钮控制:已结束 + */ + String CURRENT_STATUS_USER_FINISHED = "finished"; + + /** + * (6)用户活动页面按钮控制:已取消 + */ + String CURRENT_STATUS_USER_CANCELED = "canceled"; + + /** + * (7)用户活动页面按钮控制:已确认积分 + */ + String CURRENT_STATUS_USER_POINTS_CONFIRM = "points_confirm"; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java index 18e96e4c23..79d97f2bfa 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActInfoServiceImpl.java @@ -20,18 +20,18 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.ActConstant; import com.epmet.dao.ActInfoDao; import com.epmet.dao.ActUserRelationDao; import com.epmet.dao.HeartUserInfoDao; -import com.epmet.dao.VolunteerInfoDao; import com.epmet.dto.ActInfoDTO; import com.epmet.dto.form.resi.*; import com.epmet.dto.result.resi.*; @@ -40,8 +40,6 @@ import com.epmet.entity.ActUserRelationEntity; import com.epmet.redis.ActInfoRedis; import com.epmet.service.ActInfoService; import com.epmet.service.ActUserRelationService; -import com.epmet.utils.ActUserRelationStatusConstant; -import com.epmet.utils.ActUserStatusConstant; import com.epmet.utils.CaculateDistance; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -228,12 +226,12 @@ public class ActInfoServiceImpl extends BaseServiceImpl signUpNum) { // 我要报名(不限名额或者未报满的) - return ActUserStatusConstant.SIGN_UP; + return ActConstant.CURRENT_STATUS_USER_SIGN_UP; } else { // 已报满(限制名额且已经报满的) - return ActUserStatusConstant.ENOUGH; + return ActConstant.CURRENT_STATUS_USER_ENOUGH; } } else if (currentTime.after(actInfoEntity.getSignUpEndTime()) && currentTime.before(actInfoEntity.getActStartTime())) { /*报名结束,活动未开始:显示:截止报名*/ - return ActUserStatusConstant.END_SIGN_UP; + return ActConstant.CURRENT_STATUS_USER_END_SIGN_UP; } else if (currentTime.after(actInfoEntity.getSignInStartTime()) && currentTime.before(actInfoEntity.getSignInEndTime())) { // 活动打卡时间段内: 显示:已开始 - return ActUserStatusConstant.IN_PROGRESS; + return ActConstant.CURRENT_STATUS_USER_IN_PROGRESS; } else { - return ActUserStatusConstant.FINISHED; + return ActConstant.CURRENT_STATUS_USER_FINISHED; } } @@ -298,58 +296,58 @@ public class ActInfoServiceImpl extends BaseServiceImpl= actInfoEntity.getActQuota()) { - return ActUserStatusConstant.ENOUGH; + return ActConstant.CURRENT_STATUS_USER_ENOUGH; } // (报名审核未通过或者已经取消报名的)可再次报名-我要报名 - if (ActUserRelationStatusConstant.REFUSED.equals(actUserStatus) || ActUserRelationStatusConstant.CANCELD.equals(actUserStatus)) { - return ActUserStatusConstant.SIGN_UP; + if (ActConstant.ACT_USER_STATUS_REFUSED.equals(actUserStatus) || ActConstant.ACT_USER_STATUS_CANCELD.equals(actUserStatus)) { + return ActConstant.CURRENT_STATUS_USER_SIGN_UP; } } else if (currentTime.after(actInfoEntity.getSignUpEndTime()) && currentTime.before(actInfoEntity.getActStartTime())) { /* 报名截止但 活动未开始 */ // 已经取消报名的-报名截止 - if (ActUserRelationStatusConstant.CANCELD.equals(actUserStatus)) { - return ActUserStatusConstant.END_SIGN_UP; + if (ActConstant.ACT_USER_STATUS_CANCELD.equals(actUserStatus)) { + return ActConstant.CURRENT_STATUS_USER_END_SIGN_UP; } // 已报名审核不通过 -报名截止 - if (ActUserRelationStatusConstant.REFUSED.equals(actUserStatus)) { - return ActUserStatusConstant.END_SIGN_UP; + if (ActConstant.ACT_USER_STATUS_REFUSED.equals(actUserStatus)) { + return ActConstant.CURRENT_STATUS_USER_END_SIGN_UP; } // 已报名且审核通过、未审核 -取消报名 - if (ActUserRelationStatusConstant.PASSED.equals(actUserStatus) || ActUserRelationStatusConstant.AUDITING.equals(actUserStatus)) { - return ActUserStatusConstant.CANCELD; + if (ActConstant.ACT_USER_STATUS_PASSED.equals(actUserStatus) || ActConstant.ACT_USER_STATUS_AUDITING.equals(actUserStatus)) { + return ActConstant.ACT_USER_STATUS_CANCELD; } } - return ActUserStatusConstant.FINISHED; + return ActConstant.CURRENT_STATUS_USER_FINISHED; } @Override diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSignInRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSignInRecServiceImpl.java index 88719c0b99..5cc716d8b4 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSignInRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/ActSignInRecServiceImpl.java @@ -22,6 +22,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.ActConstant; import com.epmet.dao.ActSignInPicDao; import com.epmet.dao.ActSignInRecDao; import com.epmet.dao.ActUserLogDao; @@ -35,7 +36,6 @@ import com.epmet.entity.ActUserLogEntity; import com.epmet.redis.ActSignInRecRedis; import com.epmet.service.ActLiveRecService; import com.epmet.service.ActSignInRecService; -import com.epmet.utils.ActUserRelationStatusConstant; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -74,14 +74,14 @@ public class ActSignInRecServiceImpl extends BaseServiceImpl