This commit is contained in:
邹宗楠
2025-05-06 15:52:04 +08:00
parent 90111dd57e
commit 3e3f909cff
5 changed files with 55 additions and 8 deletions

View File

@@ -943,7 +943,9 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
// jxutils.StandardCoordinate2Int(deliveryAddress.Lng), jxutils.StandardCoordinate2Int(deliveryAddress.Lat),
// model.CoordinateTypeMars, outJxOrder.Weight, checkTime)
//TODO 2020-08-06 配送费固定5元
outJxOrder.FreightPrice = 500
if !IsDeliverySelf {
outJxOrder.FreightPrice = 500
}
// }
//如果是守价的订单,需要查询本期中该用户是否已经守价过,如果守价过就只算一次运费
if jxOrder.OrderType == model.OrderTypeDefendPrice {
@@ -1008,9 +1010,6 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
outJxOrder.FreightPrice = 0
}
}
if IsDeliverySelf {
outJxOrder.FreightPrice = 0
}
}
// B2B门店订单不足一千配送费一百
@@ -1027,10 +1026,6 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
}
}
if IsDeliverySelf {
outJxOrder.FreightPrice = 0
}
if err == nil {
if jxOrder.OrderType == model.OrderTypeNormal {
outJxOrder.TotalPrice = outJxOrder.OrderPrice + outJxOrder.FreightPrice
@@ -1105,6 +1100,11 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
outJxOrder = nil
deliveryAddress = nil
}
if IsDeliverySelf {
outJxOrder.FreightPrice = 0
}
return outJxOrder, deliveryAddress, err
}