This commit is contained in:
邹宗楠
2022-05-23 18:13:30 +08:00
parent bf1a2b7173
commit c1da882817

View File

@@ -997,9 +997,14 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
outJxOrder.FreightPrice = 0
}
}
// B2B门店订单不足一百时加收五十配送费
// B2B门店订单不足一配送费一百
if strings.Contains(storeDetail.BrandName, model.B2BTag) && jxOrder.OrderPrice < 10000 {
outJxOrder.FreightPrice += 5000 // b2b运费一百元
outJxOrder.FreightPrice = 10000 // b2b运费一百元
}
// 订单超过一千配送费优惠(门店运费)
discountPrice, err := cms.GetStoreVendorMaps(ctx, nil, jxOrder.StoreID, -1)
if len(discountPrice) == 1 && outJxOrder.OrderPrice >= int64(discountPrice[0].DeliveryFeeDeductionSill) {
outJxOrder.FreightPrice -= int64(discountPrice[0].DeliveryFeeDeductionFee)
}
if err == nil {