From 7ec449570650a848f327badf4a37befd292d6f0f 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, 26 Oct 2020 10:50:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=96=86=E8=A5=BF=E8=97=8F=E6=B5=B7?= =?UTF-8?q?=E5=8D=97=E5=86=85=E8=92=99=E5=8F=A4=E8=BF=90=E8=B4=B9=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/model/dao/dao_user.go | 5 ++++- business/partner/purchase/jx/localjx/order.go | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/business/model/dao/dao_user.go b/business/model/dao/dao_user.go index bb2fac270..c394b9acd 100644 --- a/business/model/dao/dao_user.go +++ b/business/model/dao/dao_user.go @@ -20,6 +20,7 @@ type UserDeliveryAddressEx struct { UserName string `json:"userName"` CityName string `json:"cityName"` DistrictName string `json:"districtName"` + ParentCode int `json:"parentCode"` } type GetSelfInfoResult struct { @@ -183,11 +184,13 @@ func QueryUserDeliveryAddress(db *DaoDB, addressID int64, userIDs []string, offs t1.*, t2.name user_name, district.name district_name, - city.name city_name + city.name city_name, + cp.code parent_code FROM user_delivery_address t1 LEFT JOIN user t2 ON t2.user_id = t1.user_id LEFT JOIN place district ON district.code = t1.district_code LEFT JOIN place city ON city.code = t1.city_code + LEFT JOIN place cp ON cp.code = city.parent_code WHERE t1.deleted_at = ? ` sqlParams := []interface{}{ diff --git a/business/partner/purchase/jx/localjx/order.go b/business/partner/purchase/jx/localjx/order.go index 2b848788c..364ba67ba 100644 --- a/business/partner/purchase/jx/localjx/order.go +++ b/business/partner/purchase/jx/localjx/order.go @@ -896,6 +896,14 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64 if fromStoreID != -1 { deliveryAddress.ConsigneeName = storeDetail2.Name } + //内蒙古海南统一35 + //新疆西藏统一45 + if deliveryAddress.ParentCode == 150000 || deliveryAddress.ParentCode == 460000 { + outJxOrder.FreightPrice = 3500 + } + if deliveryAddress.ParentCode == 650000 || deliveryAddress.ParentCode == 540000 { + outJxOrder.FreightPrice = 4500 + } } else { if outJxOrder.FreightPrice > specialFreightPrice { outJxOrder.FreightPrice = specialFreightPrice