StoreMap添加DeliveryFeeDeductionSill, DeliveryFeeDeductionFee

This commit is contained in:
gazebo
2020-02-21 10:24:01 +08:00
parent d1c00db614
commit 95ad575e09
4 changed files with 20 additions and 12 deletions

View File

@@ -466,6 +466,12 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
} else {
outJxOrder.FreightPrice = 0
}
if outJxOrder.OrderPrice >= int64(storeDetail.DeliveryFeeDeductionSill) {
outJxOrder.FreightPrice -= int64(storeDetail.DeliveryFeeDeductionFee)
if outJxOrder.FreightPrice < 0 {
outJxOrder.FreightPrice = 0
}
}
if err == nil {
outJxOrder.TotalPrice = outJxOrder.OrderPrice + outJxOrder.FreightPrice
outJxOrder.ActualPayPrice = outJxOrder.TotalPrice