Commit fd49f0cf by 吕明尚

订单下单锁定30秒

parent 1bb9f6eb
......@@ -1033,7 +1033,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.ROOM_LOCK_DELAY_MINUTE));
redisUtil.set(Constants.ORDER_LOCK_KEY_PREFIX + roomId, roomId, Long.valueOf(Constants.OPEN_DOOR_AHEAD_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