From c0339d245a267903d0ff99b8f5ccea47238dc869 Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 21 Aug 2019 11:53:41 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8DGetSingleStoreVendorIDs?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/partner.go | 3 ++- conf/app.conf | 8 +++----- controllers/elm_order.go | 5 ++--- controllers/weimob_callback.go | 5 ++--- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/business/partner/partner.go b/business/partner/partner.go index 8d08c2f71..29c38afa5 100644 --- a/business/partner/partner.go +++ b/business/partner/partner.go @@ -178,6 +178,7 @@ type IMultipleStoresHandler interface { type ISingleStoreHandler interface { IPurchasePlatformHandler + ISingleStoreStoreSkuHandler // SyncStoreCategory(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, isAsync bool) (hint string, err error) // RefreshStoresAllSkusID(ctx *jxcontext.Context, parentTask tasksch.ITask, isAsync bool, storeIDs []int) (hint string, err error) @@ -234,7 +235,7 @@ func GetMultiStoreVendorIDs() (vendorIDs []int) { func GetSingleStoreVendorIDs() (vendorIDs []int) { for k, v := range PurchasePlatformHandlers { - if _, ok := v.(ISingleStoreHandler); !ok { + if _, ok := v.(ISingleStoreHandler); ok { vendorIDs = append(vendorIDs, k) } } diff --git a/conf/app.conf b/conf/app.conf index c5eb2bd6e..6aa563bcb 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -18,6 +18,9 @@ mtwmCallbackURL = "http://callback.jxc4.com" autonaviKey = "4427170f870af2110becb8852d36ab08" +disableElm = true +disableWeimob = true + enableStoreWrite = false enableJdStoreWrite = false enableEbaiStoreWrite = false @@ -179,10 +182,6 @@ mtwmAppID = "4123" mtwmSecret = "df2c88338b85f830cebce2a9eab56628" mtwmCallbackURL = "http://callback-jxgy.jxc4.com" -disableElm = true -disableMtwm = false -disableWeimob = true - enableStoreWrite = true enableJdStoreWrite = true enableEbaiStoreWrite = true @@ -249,7 +248,6 @@ jdToken = "df97f334-f7d8-4b36-9664-5784d8ae0baf" jdAppKey = "06692746f7224695ad4788ce340bc854" jdSecret = "d6b42a35a7414a5490d811654d745c84" jdStorePageCookie = "5EOCZRXVCRXBTYD5EPV6FOXRCQWFFQO75FRMJ3BAKZ5JXY6XTJECMWXK5OZIPLZTUWZKZKXHXA6I7G3WMIKSWOHZIHRLNE5FZY3NBD6G5IMBOYHMJSJR3RF4TMZB2JEW2DF755YPFUSA6BMWI3KNLT3I4EAP2Z4JA6ZWAA34MNQX5P6LOI4EGG76QJU3G3VW7QFE6BAVAONMKBEHKNXNZGX3RQF7PHXDXSPJSY5XQEGM7IV2L7LKIG3M2D6QVSPEGQW4NV7SZ4TX32D2XQA7PIX46M" -disableElm = true ebaiSource = "62289" ebaiSecret = "d3ec2358d6a819ea" diff --git a/controllers/elm_order.go b/controllers/elm_order.go index bc8bdc8b1..f406e1922 100644 --- a/controllers/elm_order.go +++ b/controllers/elm_order.go @@ -4,7 +4,6 @@ import ( "net/http" "git.rosy.net.cn/baseapi/platformapi/elmapi" - "git.rosy.net.cn/jx-callback/business/partner/purchase/elm" "git.rosy.net.cn/jx-callback/globals/api" "github.com/astaxie/beego" ) @@ -17,9 +16,9 @@ type ElemeController struct { // https://open.shop.ele.me/openapi/documents/httppushmethod func (c *ElemeController) Msg() { if c.Ctx.Input.Method() == http.MethodPost { - obj, callbackResponse := api.ElmAPI.GetCallbackMsg(c.Ctx.Input.RequestBody) + _, callbackResponse := api.ElmAPI.GetCallbackMsg(c.Ctx.Input.RequestBody) if callbackResponse == nil { - callbackResponse = elm.OnCallbackMsg(obj) + // callbackResponse = elm.OnCallbackMsg(obj) } c.Data["json"] = callbackResponse c.ServeJSON() diff --git a/controllers/weimob_callback.go b/controllers/weimob_callback.go index b34d52b4c..8fa360e68 100644 --- a/controllers/weimob_callback.go +++ b/controllers/weimob_callback.go @@ -2,7 +2,6 @@ package controllers import ( "git.rosy.net.cn/jx-callback/business/jxutils/tasks" - "git.rosy.net.cn/jx-callback/business/partner/purchase/weimob/wsc" "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals/api" "github.com/astaxie/beego" @@ -14,9 +13,9 @@ type WeimobController struct { func (c *WeimobController) onCallbackMsg() { if true { //c.Ctx.Input.Method() == http.MethodPost { - msg, callbackResponse := api.WeimobAPI.GetCallbackMsg(c.Ctx.Input.RequestBody) + _, callbackResponse := api.WeimobAPI.GetCallbackMsg(c.Ctx.Input.RequestBody) if callbackResponse == nil { - callbackResponse = wsc.OnCallbackMsg(msg) + // callbackResponse = wsc.OnCallbackMsg(msg) } c.Data["json"] = callbackResponse c.ServeJSON()