From acf7aac451bd4017276b62291d10bd66b2556e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 26 Feb 2025 17:00:44 +0800 Subject: [PATCH] 1 --- business/partner/purchase/ebai/order.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/business/partner/purchase/ebai/order.go b/business/partner/purchase/ebai/order.go index f30ccaddd..652a3da83 100644 --- a/business/partner/purchase/ebai/order.go +++ b/business/partner/purchase/ebai/order.go @@ -268,7 +268,6 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo order.InvoiceEmail += "(电子发票)" default: // 不需要或者错误 } - globals.SugarLogger.Debugf("----------------3") finishTime := getTimeFromInterface(orderMap["finished_time"]) if finishTime == utils.ZeroTimeValue { @@ -287,7 +286,6 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo if order.StoreID > math.MaxInt32 { order.StoreID = 0 } - globals.SugarLogger.Debugf("----------------4") order.Status = p.getStatusFromVendorStatus(order.VendorStatus) if order.Status >= model.OrderStatusEndBegin { order.OrderFinishedAt = time.Now() @@ -301,7 +299,6 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo } } - globals.SugarLogger.Debugf("----------------5") deliveryGeo := userMap["coord_amap"].(map[string]interface{}) originalLng := utils.Interface2Float64WithDefault(deliveryGeo["longitude"], 0.0) // 饿百的订单在过一段时间后,经纬度信息会变成字符串"**" originalLat := utils.Interface2Float64WithDefault(deliveryGeo["latitude"], 0.0) @@ -319,8 +316,10 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo for _, product2 := range products { product := product2.(map[string]interface{}) skuName := product["product_name"].(string) + globals.SugarLogger.Debugf("----------------6.1") _, _, _, specUnit, _, specQuality := jxutils.SplitSkuName(skuName) productAmount := int(utils.MustInterface2Int64(product["product_amount"])) + globals.SugarLogger.Debugf("----------------6.2") sku := &model.OrderSku{ VendorOrderID: order.VendorOrderID, VendorID: model.VendorIDEBAI, @@ -334,6 +333,7 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo if shelfPosition, ok := product["shelf_position"]; ok { sku.LocationCode = shelfPosition.(string) } + globals.SugarLogger.Debugf("----------------6.3") if sku.SkuID == 0 { if product["upc"] != nil { sku.SkuID = utils.Str2Int(strings.Split(product["upc"].(string), "-")[1]) @@ -344,12 +344,14 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo } } } + globals.SugarLogger.Debugf("----------------6.4") var baiduRate int64 sku.SalePrice, baiduRate, sku.StoreSubName = getSkuSalePrice(product) order.PmSubsidyMoney += baiduRate if sku.Weight == 0 { sku.Weight = jxutils.FormatSkuWeight(specQuality, specUnit) // 订单信息里没有重量,只有名字里尝试找 } + globals.SugarLogger.Debugf("----------------6.5") // if product["isGift"].(bool) { // sku.SkuType = 1 // }