|
|
@ -127,6 +127,10 @@ public class LotteryService {
|
|
|
|
if (lottery.getApplyEndTime().isBefore(lottery.getApplyStartTime())) {
|
|
|
|
if (lottery.getApplyEndTime().isBefore(lottery.getApplyStartTime())) {
|
|
|
|
throw new BizException(ErrorConstants.APPLY_END_TIME_CANNOT_BE_BEFORE_APPLY_START_TIME);
|
|
|
|
throw new BizException(ErrorConstants.APPLY_END_TIME_CANNOT_BE_BEFORE_APPLY_START_TIME);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 报名结束时间必须在开奖时间之前5min以上
|
|
|
|
|
|
|
|
if (lottery.getDrawTime().minusMinutes(5).isBefore(lottery.getApplyEndTime())) {
|
|
|
|
|
|
|
|
throw new BizException(ErrorConstants.APPLY_END_TIME_MUST_BE_MORE_THAN_5_MINUTES_BEFORE_DRAW_TIME);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
StringBuilder regionCode = new StringBuilder();
|
|
|
|
StringBuilder regionCode = new StringBuilder();
|
|
|
|
StringBuilder regionName = new StringBuilder();
|
|
|
|
StringBuilder regionName = new StringBuilder();
|
|
|
@ -197,6 +201,10 @@ public class LotteryService {
|
|
|
|
if (lottery.getApplyEndTime().isBefore(lottery.getApplyStartTime())) {
|
|
|
|
if (lottery.getApplyEndTime().isBefore(lottery.getApplyStartTime())) {
|
|
|
|
throw new BizException(ErrorConstants.APPLY_END_TIME_CANNOT_BE_BEFORE_APPLY_START_TIME);
|
|
|
|
throw new BizException(ErrorConstants.APPLY_END_TIME_CANNOT_BE_BEFORE_APPLY_START_TIME);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 报名结束时间必须在开奖时间之前5min以上
|
|
|
|
|
|
|
|
if (lottery.getDrawTime().minusMinutes(5).isBefore(lottery.getApplyEndTime())) {
|
|
|
|
|
|
|
|
throw new BizException(ErrorConstants.APPLY_END_TIME_MUST_BE_MORE_THAN_5_MINUTES_BEFORE_DRAW_TIME);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
UserLoginDto userLoginDto = jwtUtil.getUserLoginDto(token);
|
|
|
|
UserLoginDto userLoginDto = jwtUtil.getUserLoginDto(token);
|
|
|
|
|
|
|
|
|
|
|
|