|
|
@@ -484,10 +484,16 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
orderDon.setCouponExCode(payRequest.getCouponExCode());
|
|
|
//店铺id
|
|
|
orderDon.setYhsId(yhsId);
|
|
|
+ //规格补贴id
|
|
|
+ Long subsidyId = payRequest.getSubsidyId();
|
|
|
+ if (subsidyId != null) {
|
|
|
+ //校验百亿补贴规格,并设置参数
|
|
|
+ setSubsidyOrderDonInfo(subsidyId, user, orderDon);
|
|
|
+ }
|
|
|
if (relation != null && relation.getStatus() == GroupsRelation.Status.outside) {
|
|
|
orderDon.setIsOt(true);
|
|
|
}
|
|
|
- if (orderDon.getYhsId() == 0) {
|
|
|
+ if (orderDon.getYhsId() == 0 && subsidyId == null) {
|
|
|
//虚拟商品订单,是否是分销订单
|
|
|
setDistributeOrderMark(orderDon, goodsDon.getType(), user.getId());
|
|
|
}
|
|
|
@@ -497,12 +503,6 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
throw BusinessRuntimeException.getInstance("车位与车队规格不一致");
|
|
|
}
|
|
|
}
|
|
|
- //规格补贴id
|
|
|
- Long subsidyId = payRequest.getSubsidyId();
|
|
|
- if (subsidyId != null) {
|
|
|
- //校验百亿补贴规格,并设置参数
|
|
|
- setSubsidyOrderDonInfo(subsidyId, user, orderDon);
|
|
|
- }
|
|
|
if (sku != null) {
|
|
|
//扣除使用优惠券、余额的订单金额
|
|
|
deductOrderMoney(orderDon, couponUser, payRequest.getBalance(), user, sku.getPrice(), goodsDon.getType(), payRequest.getGcCash(), payRequest.getGcpIds(), payRequest.getIsAcReduce(), subsidyId);
|