Commit b1cbe5d9 by 吕明尚

修改开门时间间隔为60秒

parent b7d41ea9
......@@ -11,9 +11,11 @@ public class Constants
{
//订单提前进场时间限制
public final static Integer OPEN_DOOR_AHEAD_HOUR = 30;
public final static Integer OPEN_DOOR_AHEAD_HOUR = 60;
//订单提前进场时间限制 -1
public final static Integer OPEN_DOOR_AHEAD_HOUR_MINUS = -30;
public final static Integer OPEN_DOOR_AHEAD_HOUR_MINUS = -60;
//房间锁定时间
public final static Integer ROOM_LOCK_HOUR = 30;
//保洁锁定订单房间状态延迟时间
public final static Integer ROOM_LOCK_DELAY_MINUTE = 60;
......
......@@ -128,7 +128,7 @@ public class OpenInterfaceServiceImpl implements OpenInterfaceService {
throw new BaseException("房间当前时段已被占用不可开门!");
}
//判断预约时间是否到达,可提前30分钟开门
//判断预约时间是否到达,可提前60分钟开门
if (DateUtils.addMinutes(sOrder.getPreStartDate(), Constants.OPEN_DOOR_AHEAD_HOUR_MINUS).compareTo(new Date()) > 0) {
throw new BaseException("预约时间未到达,可提前" + Constants.OPEN_DOOR_AHEAD_HOUR + "分钟进场,请耐心等候!");
}
......
......@@ -1457,7 +1457,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if (redisUtil.exists(Constants.ORDER_LOCK_KEY_PREFIX + roomId)) {
throw new BaseException("当前房间下单太火爆了,请稍后再试!");
}
redisUtil.set(Constants.ORDER_LOCK_KEY_PREFIX + roomId, roomId, Long.valueOf(Constants.OPEN_DOOR_AHEAD_HOUR));
redisUtil.set(Constants.ORDER_LOCK_KEY_PREFIX + roomId, roomId, Long.valueOf(Constants.ROOM_LOCK_HOUR));
}
private void unLockOrder(CreateOrderRequest request,String keyValue) {
......
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