From 3203201bc6a0d967f707ab9bebd96817631ddf5b Mon Sep 17 00:00:00 2001 From: gazebo Date: Tue, 9 Apr 2019 17:49:39 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8DGetPossibleVendorIDFromVe?= =?UTF-8?q?ndorOrderID=E4=B8=AD=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxutils/jxutils.go | 18 ++++++++---------- business/jxutils/jxutils_test.go | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/business/jxutils/jxutils.go b/business/jxutils/jxutils.go index e025464df..791e35da9 100644 --- a/business/jxutils/jxutils.go +++ b/business/jxutils/jxutils.go @@ -93,22 +93,20 @@ func GetPossibleVendorIDFromVendorOrderID(vendorOrderID string) (vendorID int) { vendorID = model.VendorIDUnknown if vendorOrderIDInt64 := utils.Str2Int64WithDefault(vendorOrderID, 0); vendorOrderIDInt64 > 0 { orderIDLen := len(vendorOrderID) - // 5287873015048 13 - // 15380342248732 14 - // 800402581000221 15 - // 33437032333978492 17 - // 3022716176275221584 19 - // 800402581000221 jd order - // 3022716176275221584 elm order + // 5287873015048 13 wsc + // 15380342248732 14 old ebai order + // 800402581000221 15 jd order + // 33437032333978492 17 mtwm order + // 3022716176275221584 19 elm order, new ebai order if orderIDLen == len("800402581000221") { vendorID = model.VendorIDJD } else if orderIDLen == len("3022716176275221584") { - vendorID = model.VendorIDELM + // vendorID = model.VendorIDELM + vendorID = model.VendorIDEBAI // 饿百零售开放平台订单接口中订单ID“order_id”字段长度将调整为19位,和饿了么订单ID“eleme_order_id”字段格式保持一致。 } else if orderIDLen == len("15380342248732") { vendorID = model.VendorIDEBAI } else if orderIDLen == len("33437032333978492") { - // vendorID = model.VendorIDMTWM - vendorID = model.VendorIDEBAI // 饿百零售开放平台订单接口中订单ID“order_id”字段长度将调整为19位,和饿了么订单ID“eleme_order_id”字段格式保持一致。 + vendorID = model.VendorIDMTWM } else if orderIDLen == len("5287873015048") { vendorID = model.VendorIDWSC } diff --git a/business/jxutils/jxutils_test.go b/business/jxutils/jxutils_test.go index ec931fd5c..68fe2793d 100644 --- a/business/jxutils/jxutils_test.go +++ b/business/jxutils/jxutils_test.go @@ -130,7 +130,7 @@ func TestGetPossibleVendorIDFromVendorOrderID(t *testing.T) { }, []interface{}{ "3022716176275221584", - model.VendorIDELM, + model.VendorIDEBAI, }, []interface{}{ "302271617627522158X",