|
@@ -475,8 +475,12 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
throw BusinessRuntimeException.getInstance("购买数量必须大于0");
|
|
throw BusinessRuntimeException.getInstance("购买数量必须大于0");
|
|
|
}
|
|
}
|
|
|
payRequest.setNum(quantity);
|
|
payRequest.setNum(quantity);
|
|
|
- boolean multiQuantity = quantity > 1 && sku != null && Boolean.TRUE.equals(sku.getIsMultiQuantity());
|
|
|
|
|
- if (quantity > 1 && !multiQuantity) {
|
|
|
|
|
|
|
+ // 补差价商品的数量表示差价金额,沿用原有的特殊下单流程,不能进入
|
|
|
|
|
+ // 普通多件商品的独立票券履约逻辑,也不能被普通 SKU 多件开关拦截。
|
|
|
|
|
+ boolean priceDifferenceOrder = goodsDon.getType() != null && goodsDon.getType() == 5;
|
|
|
|
|
+ boolean multiQuantity = !priceDifferenceOrder && quantity > 1 && sku != null
|
|
|
|
|
+ && Boolean.TRUE.equals(sku.getIsMultiQuantity());
|
|
|
|
|
+ if (quantity > 1 && !priceDifferenceOrder && !multiQuantity) {
|
|
|
throw BusinessRuntimeException.getInstance("该规格不支持一次购买多个");
|
|
throw BusinessRuntimeException.getInstance("该规格不支持一次购买多个");
|
|
|
}
|
|
}
|
|
|
if (multiQuantity) {
|
|
if (multiQuantity) {
|
|
@@ -487,7 +491,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//是否是补差价订单
|
|
//是否是补差价订单
|
|
|
- if (goodsDon.getType() != null && goodsDon.getType() == 5) {
|
|
|
|
|
|
|
+ if (priceDifferenceOrder) {
|
|
|
return generateDifferOrderDon(payRequest, goodsDon, sku);
|
|
return generateDifferOrderDon(payRequest, goodsDon, sku);
|
|
|
}
|
|
}
|
|
|
if (goodsDon == null || !goodsDon.getStatus()) {
|
|
if (goodsDon == null || !goodsDon.getStatus()) {
|