1.代客下单 masterId实时更新修复

This commit is contained in:
2024-08-27 10:44:50 +08:00
parent d78a7a7ac6
commit 4929e467ab

View File

@@ -901,7 +901,9 @@ public class TbShopTableServiceImpl implements TbShopTableService {
if (isFirst) {
// 后付费,不增加当前台桌取餐号
if (createOrderDTO.isPostPay()) {
addGlobalCode(day, "pc", String.valueOf(createOrderDTO.getShopId()));
// addGlobalCode(day, "pc", String.valueOf(createOrderDTO.getShopId()));
String key = "SHOP:CODE:USER:pc" + ":" + createOrderDTO.getShopId() + ":" + day + ":" + orderInfo.getTableId();
redisTemplate.delete(key);
} else {
String key = "SHOP:CODE:USER:pc" + ":" + createOrderDTO.getShopId() + ":" + day + ":" + orderInfo.getTableId();
redisTemplate.delete(key);
@@ -914,6 +916,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
.eq(TbShopTable::getQrcode, createOrderDTO.getTableId())
.set(TbShopTable::getStatus, TableStateEnum.USING.getState()));
if (createOrderDTO.isPostPay()) {
rabbitMsgUtils.printTicket(String.valueOf(orderId));
}