清台接口
This commit is contained in:
@@ -255,7 +255,10 @@ public class ShopTableServiceImpl extends ServiceImpl<ShopTableMapper, ShopTable
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean clear(long shopId, ShopTableClearDTO shopTableClearDTO) {
|
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.setStatus(ShopTableStatusEnum.IDLE.getValue());
|
||||||
shopTable.setEndTime(DateUtil.date().toLocalDateTime());
|
shopTable.setEndTime(DateUtil.date().toLocalDateTime());
|
||||||
shopTable.setProductNum(0);
|
shopTable.setProductNum(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user