删除购物车修改
This commit is contained in:
parent
76264b379a
commit
b1835e370d
|
|
@ -577,7 +577,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
|
||||
cashierCartMapper.deleteById(cashierCart.getId());
|
||||
|
||||
if (removeCartDTO.getTableId() != null) {
|
||||
if (cashierCart.getTableId() != null && removeCartDTO.getTableId() != null) {
|
||||
// 清空购物车 出票
|
||||
long carCount = countCar(Long.valueOf(cashierCart.getTableId()), cashierCart.getShopId(), cashierCart.getMasterId());
|
||||
|
||||
|
|
@ -1850,6 +1850,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
product.getPackFee().multiply(BigDecimal.valueOf(item.getNumber())) : BigDecimal.ZERO);
|
||||
item.setTableId("");
|
||||
item.setUseType(OrderUseTypeEnum.TAKEOUT.getValue());
|
||||
item.setIsPack("true");
|
||||
});
|
||||
|
||||
List<TbOrderDetail> detailList = orderDetailMapper.selectList(new LambdaQueryWrapper<TbOrderDetail>()
|
||||
|
|
@ -1874,6 +1875,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
.eq(TbCashierCart::getShopId, choseModelDTO.getShopId())
|
||||
.set(TbCashierCart::getTableId, choseModelDTO.getTableId())
|
||||
.set(TbCashierCart::getUseType, choseModelDTO.getUseType())
|
||||
.set(TbCashierCart::getIsPack, "false")
|
||||
.set(TbCashierCart::getPackFee, BigDecimal.ZERO));
|
||||
return orderDetailMapper.update(null, new LambdaUpdateWrapper<TbOrderDetail>()
|
||||
.in(TbOrderDetail::getCartId, choseModelDTO.getCartIds())
|
||||
|
|
|
|||
Loading…
Reference in New Issue