清台接口

This commit is contained in:
张松
2025-03-06 16:29:34 +08:00
parent d9c63a4bd2
commit d0d2a4d32b

View File

@@ -256,7 +256,7 @@ public class ShopTableServiceImpl extends ServiceImpl<ShopTableMapper, ShopTable
@Override
public Boolean clear(long shopId, ShopTableClearDTO shopTableClearDTO) {
ShopTable shopTable = getOne(new QueryWrapper().eq(ShopTable::getShopId, shopId).eq(ShopTable::getId, shopTableClearDTO.getId()));
if (ShopTableStatusEnum.CLEANING.equalsVal(shopTable.getStatus())) {
if (!ShopTableStatusEnum.CLEANING.equalsVal(shopTable.getStatus())) {
throw new ApiNotPrintException("台桌不处于待清台状态");
}
shopTable.setStatus(ShopTableStatusEnum.IDLE.getValue());