From e8af675481561856118846a2d7481ad529551881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 25 Feb 2020 10:07:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=9C=BA=E8=AE=A2=E5=8D=95=E8=BF=90?= =?UTF-8?q?=E8=B4=B9=E6=9C=80=E9=AB=9815=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/jx/localjx/order.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/business/partner/purchase/jx/localjx/order.go b/business/partner/purchase/jx/localjx/order.go index dd170c50d..4cad8b3ce 100644 --- a/business/partner/purchase/jx/localjx/order.go +++ b/business/partner/purchase/jx/localjx/order.go @@ -35,7 +35,8 @@ const ( PayWaitingTime = 10 * time.Minute // 等待支付的最长时间 DingShiDaMinTime = 1 * time.Hour - specialStoreID = 100274 + 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 {