From 8d52b66ac622cff82087fc7c55f0efc6aca53497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 24 Aug 2020 15:04:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E4=B8=80=E5=A4=A9=E5=AE=88=E4=BB=B7?= =?UTF-8?q?=E5=A4=9A=E6=AC=A1=E5=8F=AA=E7=AE=97=E4=B8=80=E6=AC=A1=E8=BF=90?= =?UTF-8?q?=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/jx/localjx/order.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/business/partner/purchase/jx/localjx/order.go b/business/partner/purchase/jx/localjx/order.go index 8e27cd8e3..7525658e8 100644 --- a/business/partner/purchase/jx/localjx/order.go +++ b/business/partner/purchase/jx/localjx/order.go @@ -781,6 +781,11 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64 //TODO 2020-08-06 配送费固定5元 outJxOrder.FreightPrice = 500 // } + //如果是守价的订单,需要查询本期中该用户是否已经守价过,如果守价过就只算一次运费 + priceDefendOrders, _ := dao.GetPriceDefendOrder(db, nil, nil, []int{jxutils.GetDefendPriceIssue()}, 0, -1, -1, deliveryAddress.UserID, utils.ZeroTimeValue, utils.ZeroTimeValue, false) + if len(priceDefendOrders) > 0 { + outJxOrder.FreightPrice = 0 + } } else { outJxOrder.FreightPrice = 0 }