From d727cf0d1ee3f93fb5fc4c512bc296b9ecb338f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 15 May 2020 09:30:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A5=BF=E7=99=BE=E8=87=AA=E6=8F=90=E5=8D=95?= =?UTF-8?q?=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store_sku.go | 2 -- business/partner/purchase/ebai/order.go | 14 +++++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index d021103c2..7896db770 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -549,8 +549,6 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, isFocus, i } var tmpList []*tGetStoresSkusInfo beginTime := time.Now() - fmt.Println("test1", sql) - fmt.Println(sqlParams) if err = dao.GetRows(db, &tmpList, sql, sqlParams...); err != nil { dao.Rollback(db) return nil, err diff --git a/business/partner/purchase/ebai/order.go b/business/partner/purchase/ebai/order.go index 9f9b4271a..067fbeb2d 100644 --- a/business/partner/purchase/ebai/order.go +++ b/business/partner/purchase/ebai/order.go @@ -61,10 +61,14 @@ var ( } ) -func mapDeliveryType(ebaiDeliveryParty int) (deliveryType string) { - deliveryType = deliveryTypeMap[ebaiDeliveryParty] - if deliveryType == "" { - deliveryType = model.OrderDeliveryTypePlatform +func mapDeliveryType(ebaiDeliveryParty int, businessType int) (deliveryType string) { + if businessType == ebaiapi.DeliveryBusinessTypeZT { + return model.OrderDeliveryTypeSelfTake + } else { + deliveryType = deliveryTypeMap[ebaiDeliveryParty] + if deliveryType == "" { + deliveryType = model.OrderDeliveryTypePlatform + } } return deliveryType } @@ -226,7 +230,7 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo ActualPayPrice: utils.ForceInterface2Int64(orderMap["user_fee"]), BaseFreightMoney: utils.ForceInterface2Int64(orderMap["send_fee"]), TotalShopMoney: utils.ForceInterface2Int64(orderMap["shop_fee"]), - DeliveryType: mapDeliveryType(int(utils.ForceInterface2Int64(orderMap["delivery_party"]))), + DeliveryType: mapDeliveryType(int(utils.ForceInterface2Int64(orderMap["delivery_party"])), int(utils.ForceInterface2Int64(orderMap["business_type"]))), InvoiceTitle: utils.Interface2String(orderMap["invoice_title"]), InvoiceTaxerID: utils.Interface2String(orderMap["taxer_id"]),