台桌修改状态清除用餐人数
This commit is contained in:
@@ -233,6 +233,9 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||
TbShopTable tbShopTable = tbShopTableRepository.findById(resources.getId()).orElseGet(TbShopTable::new);
|
||||
ValidationUtil.isNull(tbShopTable.getId(), "TbShopTable", "id", resources.getId());
|
||||
tbShopTable.copy(resources);
|
||||
if ("idle".equals(resources.getStatus())) {
|
||||
tbShopTable.setUseNum(0);
|
||||
}
|
||||
tbShopTableRepository.save(tbShopTable);
|
||||
}
|
||||
|
||||
@@ -1461,6 +1464,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
.eq(TbShopTable::getQrcode, orderInfo.getTableId())
|
||||
.set(TbShopTable::getEndTime, DateUtil.date())
|
||||
.set(TbShopTable::getUseNum, 0)
|
||||
.set(TbShopTable::getStatus, TableStateEnum.IDLE.getState()));
|
||||
} else {
|
||||
mpShopTableMapper.update(null, new LambdaUpdateWrapper<TbShopTable>()
|
||||
|
||||
Reference in New Issue
Block a user