1.代客下单 创建订单增加锁
2.代客下单 主扫支付
This commit is contained in:
@@ -18,6 +18,9 @@ public interface RedisConstant {
|
||||
String ADD_TABLE_CART_LOCK = "ADD_TABLE_CART";
|
||||
String PC_OUT_NUMBER = "PC_OUT_NUMBER:";
|
||||
|
||||
String LOCK_KEY = "LOCK:";
|
||||
String CREATE_ORDER = "CREATE_ORDER";
|
||||
|
||||
|
||||
static String getCurrentOrderKey(String tableId, String shopId) {
|
||||
return CURRENT_TABLE_ORDER + shopId + ":" + tableId;
|
||||
@@ -26,4 +29,12 @@ public interface RedisConstant {
|
||||
static String getTableCartKey(String tableId, String shopId) {
|
||||
return TABLE_CART + tableId + "-" + shopId;
|
||||
}
|
||||
|
||||
static String getLockKey(String sign, Object... args) {
|
||||
StringBuilder key = new StringBuilder(LOCK_KEY + ":" + sign + ":");
|
||||
for (Object arg : args) {
|
||||
key.append(":").append(arg.toString());
|
||||
}
|
||||
return key.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user