商场订单运费最高15块
This commit is contained in:
@@ -35,7 +35,8 @@ const (
|
|||||||
PayWaitingTime = 10 * time.Minute // 等待支付的最长时间
|
PayWaitingTime = 10 * time.Minute // 等待支付的最长时间
|
||||||
DingShiDaMinTime = 1 * time.Hour
|
DingShiDaMinTime = 1 * time.Hour
|
||||||
|
|
||||||
specialStoreID = 100274
|
specialStoreID = 100274
|
||||||
|
specialFreightPrice = 200
|
||||||
|
|
||||||
wxAppID = "wx4b5930c13f8b1170"
|
wxAppID = "wx4b5930c13f8b1170"
|
||||||
)
|
)
|
||||||
@@ -471,12 +472,15 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
|
|||||||
outJxOrder.FreightPrice, _, err = delivery.CalculateDeliveryFee(dao.GetDB(), jxOrder.StoreID, "",
|
outJxOrder.FreightPrice, _, err = delivery.CalculateDeliveryFee(dao.GetDB(), jxOrder.StoreID, "",
|
||||||
jxutils.StandardCoordinate2Int(deliveryAddress.Lng), jxutils.StandardCoordinate2Int(deliveryAddress.Lat),
|
jxutils.StandardCoordinate2Int(deliveryAddress.Lng), jxutils.StandardCoordinate2Int(deliveryAddress.Lat),
|
||||||
model.CoordinateTypeMars, outJxOrder.Weight, checkTime)
|
model.CoordinateTypeMars, outJxOrder.Weight, checkTime)
|
||||||
if jxOrder.StoreID == specialStoreID {
|
// if jxOrder.StoreID == specialStoreID {
|
||||||
outJxOrder.FreightPrice = 0
|
// outJxOrder.FreightPrice = 0
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
outJxOrder.FreightPrice = 0
|
outJxOrder.FreightPrice = 0
|
||||||
}
|
}
|
||||||
|
if outJxOrder.FreightPrice > specialFreightPrice {
|
||||||
|
outJxOrder.FreightPrice = specialFreightPrice
|
||||||
|
}
|
||||||
if outJxOrder.OrderPrice >= int64(storeDetail.DeliveryFeeDeductionSill) {
|
if outJxOrder.OrderPrice >= int64(storeDetail.DeliveryFeeDeductionSill) {
|
||||||
outJxOrder.FreightPrice -= int64(storeDetail.DeliveryFeeDeductionFee)
|
outJxOrder.FreightPrice -= int64(storeDetail.DeliveryFeeDeductionFee)
|
||||||
if outJxOrder.FreightPrice < 0 {
|
if outJxOrder.FreightPrice < 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user