商场订单运费最高15块

This commit is contained in:
苏尹岚
2020-02-25 10:07:16 +08:00
parent 2241315645
commit e8af675481

View File

@@ -36,6 +36,7 @@ const (
DingShiDaMinTime = 1 * time.Hour
specialStoreID = 100274
specialFreightPrice = 200
wxAppID = "wx4b5930c13f8b1170"
)
@@ -471,12 +472,15 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
outJxOrder.FreightPrice, _, err = delivery.CalculateDeliveryFee(dao.GetDB(), jxOrder.StoreID, "",
jxutils.StandardCoordinate2Int(deliveryAddress.Lng), jxutils.StandardCoordinate2Int(deliveryAddress.Lat),
model.CoordinateTypeMars, outJxOrder.Weight, checkTime)
if jxOrder.StoreID == specialStoreID {
outJxOrder.FreightPrice = 0
}
// if jxOrder.StoreID == specialStoreID {
// outJxOrder.FreightPrice = 0
// }
} else {
outJxOrder.FreightPrice = 0
}
if outJxOrder.FreightPrice > specialFreightPrice {
outJxOrder.FreightPrice = specialFreightPrice
}
if outJxOrder.OrderPrice >= int64(storeDetail.DeliveryFeeDeductionSill) {
outJxOrder.FreightPrice -= int64(storeDetail.DeliveryFeeDeductionFee)
if outJxOrder.FreightPrice < 0 {