Commit 45a78147 by 吕明尚

修改订单15分钟内续单条件

parent 976f0495
......@@ -865,8 +865,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
SOrder one = getOne(new LambdaQueryWrapper<SOrder>().eq(SOrder::getOrderNo, request.getPreOrderNo()));
//结束时间加15分钟
Date date = cn.hutool.core.date.DateUtil.offsetMinute(one.getEndDate(), 15);
if ((one.getStatus().equals(OrderStatusEnum.USED.getCode()) && date.getTime() > new Date().getTime())
| !redisUtil.exists(ReceiptRdeisEnum.ROOM_EXPIRE_TIME.getValue() + request.getPreOrderNo()))
if ((one.getStatus().equals(OrderStatusEnum.USED.getCode()) && date.getTime() < new Date().getTime())
& !redisUtil.exists(ReceiptRdeisEnum.ROOM_EXPIRE_TIME.getValue() + request.getPreOrderNo()))
throw new BaseException("原订单已过期,请重新预约");
sOrder.setStartDate(sOrder.getPreStartDate());
sOrder.setEndDate(sOrder.getPreEndDate());
......
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