台桌预订改造

This commit is contained in:
谭凯凯
2024-12-13 16:40:38 +08:00
committed by Tankaikai
parent 22f6c253a0
commit 2ce9909e1b
2 changed files with 2 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package cn.ysk.cashier.enums;
public enum TableStateEnum { public enum TableStateEnum {
IDLE("idle"), IDLE("idle"),
SUBSCRIBE("subscribe"),
CLOSED("closed"), PAYING("paying"), PENDING("pending"), USING("using"), CLEANING("cleaning"); CLOSED("closed"), PAYING("paying"), PENDING("pending"), USING("using"), CLEANING("cleaning");
private String state = "closed"; private String state = "closed";

View File

@@ -306,6 +306,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
data.setStatus("idle"); data.setStatus("idle");
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>() mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
.eq(TbShopTable::getQrcode, data.getQrcode()) .eq(TbShopTable::getQrcode, data.getQrcode())
.ne(TbShopTable::getStatus, TableStateEnum.SUBSCRIBE.getState())
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState())); .set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
} }
Map<String, Object> itemMap = BeanUtil.beanToMap(data, false, false); Map<String, Object> itemMap = BeanUtil.beanToMap(data, false, false);