From f316fd4c1f5cf369976c0ce4ba82c5afa31a496b Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 13 Nov 2018 15:53:43 +0800 Subject: [PATCH] - all ebai order msg order_id is tring - if store_id of ebai order larger than math.MaxInt32, set it to zero --- business/partner/purchase/ebai/callback.go | 2 +- business/partner/purchase/ebai/order.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/business/partner/purchase/ebai/callback.go b/business/partner/purchase/ebai/callback.go index dbc487709..9a48a79b3 100644 --- a/business/partner/purchase/ebai/callback.go +++ b/business/partner/purchase/ebai/callback.go @@ -9,7 +9,7 @@ import ( func OnCallbackMsg(msg *ebaiapi.CallbackMsg) (response *ebaiapi.CallbackResponse) { orderID := "" - if msg.Cmd == ebaiapi.CmdOrderCreate { + if true { //msg.Cmd == ebaiapi.CmdOrderCreate { // 与测试时情况不一样,好像线上全改成string了 orderID = msg.Body["order_id"].(string) } else { orderID = utils.Int64ToStr(utils.MustInterface2Int64(msg.Body["order_id"])) diff --git a/business/partner/purchase/ebai/order.go b/business/partner/purchase/ebai/order.go index 6bfdd63cf..bf6d85271 100644 --- a/business/partner/purchase/ebai/order.go +++ b/business/partner/purchase/ebai/order.go @@ -1,6 +1,7 @@ package ebai import ( + "math" "time" "git.rosy.net.cn/baseapi/platformapi/autonavi" @@ -57,6 +58,9 @@ func (p *PurchaseHandler) GetOrder(vendorOrderID string) (order *model.GoodsOrde ActualPayPrice: utils.MustInterface2Int64(orderMap["user_fee"]), Skus: []*model.OrderSku{}, } + if order.StoreID > math.MaxInt32 { + order.StoreID = 0 + } order.Status = p.GetStatusFromVendorStatus(order.VendorStatus) if utils.MustInterface2Int64(orderMap["send_immediately"]) == 1 { order.BusinessType = model.BusinessTypeImmediate