1.添加mybatisPlus依赖
2.排队取号接口
This commit is contained in:
@@ -26,13 +26,31 @@ public class RedisCst {
|
||||
public static final String CREATE_ORDER_LOCK = "CREATE_ORDER_LOCK:";
|
||||
public static final String SEND_STOCK_WARN_MSG = "SEND_STOCK_WARN_MSG:";
|
||||
public static final String SONG_PAY_LOCK = "song_pay_lock:";
|
||||
public static final String ORDER_PRINT_PRO = "ORDER_PRINT_PRODUCT:";
|
||||
public static final String ORDER_PRINT = "ORDER_PRINT:";
|
||||
public static final String ORDER_PRINT_PRO = "ORDER_PRINT_PRODUCT:";
|
||||
public static final String ORDER_PRINT = "ORDER_PRINT:";
|
||||
|
||||
static String CURRENT_TABLE_ORDER = "CURRENT_TABLE_ORDER:";
|
||||
static final String CURRENT_TABLE_ORDER = "CURRENT_TABLE_ORDER:";
|
||||
|
||||
// 排队取号全局号码
|
||||
public static final String TABLE_CALL_NUMBER = "TABLE_CALL_NUMBER:";
|
||||
|
||||
// 全局锁
|
||||
public static final String LOCK_KEY = "LOCK:";
|
||||
|
||||
|
||||
public static String getCurrentOrderKey(String tableId, String shopId) {
|
||||
return CURRENT_TABLE_ORDER + shopId + ":" + tableId;
|
||||
}
|
||||
|
||||
public static String getTableCallNumKey(Integer shopId, Integer callTableId) {
|
||||
return TABLE_CALL_NUMBER + shopId + ":" + callTableId;
|
||||
}
|
||||
|
||||
public 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