台桌预订改造

This commit is contained in:
谭凯凯
2024-12-13 16:45:34 +08:00
committed by Tankaikai
parent 2ce9909e1b
commit b9e0101841

View File

@@ -303,11 +303,13 @@ public class TbShopTableServiceImpl implements TbShopTableService {
if (StrUtil.isBlank(data.getQrcode())) {
data.setStatus("unbind");
} else if ((countMap.get(data.getQrcode()) == null || countMap.get(data.getQrcode()) < 1) && !TableStateEnum.CLEANING.getState().equals(data.getStatus())) {
data.setStatus("idle");
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
.eq(TbShopTable::getQrcode, data.getQrcode())
.ne(TbShopTable::getStatus, TableStateEnum.SUBSCRIBE.getState())
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
if (!TableStateEnum.SUBSCRIBE.getState().equals(data.getStatus())) {
data.setStatus("idle");
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
.eq(TbShopTable::getQrcode, data.getQrcode())
.ne(TbShopTable::getStatus, TableStateEnum.SUBSCRIBE.getState())
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
}
}
Map<String, Object> itemMap = BeanUtil.beanToMap(data, false, false);
if ((data.getStatus().equals("using") || data.getStatus().equals("cleaning")) && data.getUseTime() != null) {