1.代客下单 台桌状态同时校验detail和购物车数据

This commit is contained in:
2024-08-29 14:24:54 +08:00
parent 0bdbd07555
commit 3829685b58
2 changed files with 6 additions and 1 deletions

View File

@@ -70,7 +70,9 @@ public class ShopInfoService {
if (StrUtil.isBlank(tbShopTableVO.getQrcode())) {
tbShopTableVO.setStatus("closed");
}else if (tbCashierCartMapper.countTable(tbShopTableVO.getQrcode(), tbShopTableVO.getShopId()) < 1) {
}else if (tbCashierCartMapper.countTable(tbShopTableVO.getQrcode(), tbShopTableVO.getShopId()) < 1 ||
tbCashierCartMapper.countTableByDetail(tbShopTableVO.getQrcode(), tbShopTableVO.getShopId()) < 1
) {
tbShopTableVO.setStatus("idle");
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
.eq(TbShopTable::getQrcode, tbShopTableVO.getQrcode())