台桌预订改造

This commit is contained in:
谭凯凯
2024-12-13 18:14:47 +08:00
committed by Tankaikai
parent 111a92935a
commit 42b310b237

View File

@@ -303,11 +303,11 @@ public class TbShopTableServiceImpl implements TbShopTableService {
if (StrUtil.isBlank(data.getQrcode())) { if (StrUtil.isBlank(data.getQrcode())) {
data.setStatus("unbind"); data.setStatus("unbind");
} else if ((countMap.get(data.getQrcode()) == null || countMap.get(data.getQrcode()) < 1) && !TableStateEnum.CLEANING.getState().equals(data.getStatus())) { } else if ((countMap.get(data.getQrcode()) == null || countMap.get(data.getQrcode()) < 1) && !TableStateEnum.CLEANING.getState().equals(data.getStatus())) {
if (!TableStateEnum.SUBSCRIBE.getState().equals(data.getStatus())) { if (TableStateEnum.USING.getState().equals(data.getStatus())) {
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()) .eq(TbShopTable::getStatus, TableStateEnum.USING.getState())
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState())); .set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
} }
} }