Commit 62f1dfb6 by 吕明尚

续单退款订单判断直接到15分钟

parent eb3446c5
...@@ -451,7 +451,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -451,7 +451,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
//查询预定的结束时间是否在续单的开始时间之后和开始时间加一分钟前 //查询预定的结束时间是否在续单的开始时间之后和开始时间加一分钟前
LambdaQueryWrapper<SOrder> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SOrder> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SOrder::getRoomId, oldSOrder.getRoomId()); queryWrapper.eq(SOrder::getRoomId, oldSOrder.getRoomId());
queryWrapper.between(SOrder::getEndDate, preStartDate, DateUtil.addMin(preStartDate, 1)); queryWrapper.between(SOrder::getEndDate, DateUtil.addMin(preStartDate, -15), preStartDate);
SOrder one = getOne(queryWrapper); SOrder one = getOne(queryWrapper);
if (one.getStatus().equals(OrderStatusEnum.USED.getCode())) { if (one.getStatus().equals(OrderStatusEnum.USED.getCode())) {
if (one.getEndDate().getTime() > new Date().getTime()) { if (one.getEndDate().getTime() > new Date().getTime()) {
......
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