1.代客下单 创建订单直接付款不增加placeNum
This commit is contained in:
parent
7f0056304d
commit
7c00d0d9a0
|
|
@ -1037,7 +1037,8 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||||
|
|
||||||
Integer mealNum = null;
|
Integer mealNum = null;
|
||||||
|
|
||||||
if (addMaterId && cashierCarts.stream().noneMatch(item -> item.getPlaceNum() == null)) {
|
boolean unAdd = cashierCarts.stream().noneMatch(item -> item.getPlaceNum() == null);
|
||||||
|
if (addMaterId && unAdd) {
|
||||||
throw new BadRequestException("此次未添加新商品,清先添加商品");
|
throw new BadRequestException("此次未添加新商品,清先添加商品");
|
||||||
}
|
}
|
||||||
for (TbCashierCart cashierCart : cashierCarts) {
|
for (TbCashierCart cashierCart : cashierCarts) {
|
||||||
|
|
@ -1101,7 +1102,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
||||||
orderInfo.setUseType(createOrderDTO.isPostPay() ? "postPay" : "afterPay");
|
orderInfo.setUseType(createOrderDTO.isPostPay() ? "postPay" : "afterPay");
|
||||||
orderInfo.setUserId(createOrderDTO.getVipUserId() == null ? null : String.valueOf(createOrderDTO.getVipUserId()));
|
orderInfo.setUserId(createOrderDTO.getVipUserId() == null ? null : String.valueOf(createOrderDTO.getVipUserId()));
|
||||||
orderInfo.setCreatedAt(DateUtil.current());
|
orderInfo.setCreatedAt(DateUtil.current());
|
||||||
if (addMaterId) {
|
if (!unAdd) {
|
||||||
orderInfo.setPlaceNum(placeNum);
|
orderInfo.setPlaceNum(placeNum);
|
||||||
}
|
}
|
||||||
orderInfoMapper.updateById(orderInfo);
|
orderInfoMapper.updateById(orderInfo);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue