清台接口

This commit is contained in:
张松
2025-03-06 16:26:11 +08:00
parent f3866b0f15
commit d9c63a4bd2

View File

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