|
|
@ -23,6 +23,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
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.page.PageData; |
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
@ -399,14 +400,19 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit |
|
|
Date currentTime = new Date(); |
|
|
Date currentTime = new Date(); |
|
|
// 查询 活动信息
|
|
|
// 查询 活动信息
|
|
|
ActInfoEntity entity = baseDao.selectById(formDTO.getActId()); |
|
|
ActInfoEntity entity = baseDao.selectById(formDTO.getActId()); |
|
|
if (currentTime.before(entity.getSignInStartTime())){ |
|
|
if (null != entity){ |
|
|
// 签到时间还未到~
|
|
|
if (currentTime.before(entity.getSignInStartTime())){ |
|
|
resultDTO.setTip(EpmetErrorCode.SIGN_IN_TIME_NO.getMsg()); |
|
|
// 签到时间还未到~
|
|
|
resultDTO.setFlag(EpmetErrorCode.SIGN_IN_TIME_NO.getCode()); |
|
|
resultDTO.setTip(EpmetErrorCode.SIGN_IN_TIME_NO.getMsg()); |
|
|
} else if (currentTime.after(entity.getSignInEndTime())){ |
|
|
resultDTO.setFlag(EpmetErrorCode.SIGN_IN_TIME_NO.getCode()); |
|
|
// 签到时间已结束~
|
|
|
} else if (currentTime.after(entity.getSignInEndTime())){ |
|
|
resultDTO.setTip(EpmetErrorCode.SIGN_IN_TIME_END.getMsg()); |
|
|
// 签到时间已结束~
|
|
|
resultDTO.setFlag(EpmetErrorCode.SIGN_IN_TIME_END.getCode()); |
|
|
resultDTO.setTip(EpmetErrorCode.SIGN_IN_TIME_END.getMsg()); |
|
|
|
|
|
resultDTO.setFlag(EpmetErrorCode.SIGN_IN_TIME_END.getCode()); |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
logger.error("签到失败,未查到匹配的活动信息,传参活动ID:" + formDTO.getActId()); |
|
|
|
|
|
throw new RenException("签到失败,未查到匹配的活动信息"); |
|
|
} |
|
|
} |
|
|
return new Result<ResiActRegistrationResultDTO>().ok(resultDTO); |
|
|
return new Result<ResiActRegistrationResultDTO>().ok(resultDTO); |
|
|
} |
|
|
} |
|
|
|