Commit bc3b0ee6 by wuwenlong

order pack check bugfix;

parent da387aba
......@@ -363,14 +363,19 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
throw new BaseException("当前套餐仅首次下单可用!");
}
}
Date now = new Date();
if(now.compareTo(request.getPreStartDate())>0
|| now.compareTo(request.getPreEndDate())<0){
throw new BaseException("预约时段非套餐可用时段!");
if(Objects.nonNull(pack.getPackaStartPeriod())&&Objects.nonNull(pack.getPackaEndPeriod())
&&(!StringUtils.equals(pack.getPackaStartPeriod(),"0")||!StringUtils.equals(pack.getPackaEndPeriod(),"23"))) {
String preStartHour = DateUtils.parseDateToStr("H", request.getPreStartDate());
String preEndHour = DateUtils.parseDateToStr("H", request.getPreEndDate());
if (Integer.parseInt(pack.getPackaStartPeriod()) < Integer.parseInt(preStartHour)
|| Integer.parseInt(pack.getPackaEndPeriod()) < Integer.parseInt(preEndHour)) {
throw new BaseException("预约时段非套餐可用时段!");
}
}
}
}
private void checkOrderDate(CreateOrderRequest request) {
LambdaQueryWrapper<SOrder> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.notIn(SOrder::getRefundStatus, RefundStatusEnum.getRefundedStatus());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment