打印 调整

This commit is contained in:
2026-04-15 18:17:41 +08:00
parent 44f896168f
commit 45fbdd514e
33 changed files with 1887 additions and 1155 deletions

View File

@@ -3,6 +3,7 @@ package com.czg.config;
/**
*
* key常量
*
* @author Administrator
*/
public interface RedisCst {
@@ -12,7 +13,6 @@ public interface RedisCst {
String SYS_LOG_KEY = "sys:log:";
/**
* key过期监听
*/
@@ -50,11 +50,18 @@ public interface RedisCst {
// 排队取号全局号码
String TABLE_CALL_NUMBER = "table:call:number:";
String PRINT_ORDER_DETAIL = "print:order:detail:";
// 点歌地址url
String SONG_URL = "song:";
class kitchen {
//后厨总单
public static final String ALL = "print:kitchen:all";
//菜品单
public static final String NORMAL = "print:kitchen:normal";
//退菜单
public static final String REFUND_ALL = "print:kitchen:refundAll";
}
static String getLockKey(String sign, Object... args) {
StringBuilder key = new StringBuilder(LOCK_KEY + ":" + sign + ":");
@@ -70,9 +77,31 @@ public interface RedisCst {
return TABLE_CALL_NUMBER + shopId + ":" + callTableId;
}
/**
* 后厨总单
*
* @param machineId 打印机设备id
*/
static String kitchenAll(Long orderId, Long machineId) {
return kitchen.ALL + orderId + ":" + machineId;
}
static String getPrintOrderDetailKey(Long orderId, Long detailId) {
return PRINT_ORDER_DETAIL + orderId + ":" + detailId;
/**
* 后厨单个菜品单
*
* @param machineId 打印机设备id
*/
static String kitchenNormal(Long orderId, Long machineId, Long detailId) {
return kitchen.NORMAL + orderId + ":" + machineId + ":" + detailId;
}
/**
* 后厨总单
*
* @param machineId 打印机设备id
*/
static String kitchenRefundAll(Long orderId, Long machineId) {
return kitchen.REFUND_ALL + orderId + ":" + machineId;
}
static String getSongUrlKey(Long shopId) {