- 修复GetSingleStoreVendorIDs的bug
This commit is contained in:
@@ -178,6 +178,7 @@ type IMultipleStoresHandler interface {
|
|||||||
|
|
||||||
type ISingleStoreHandler interface {
|
type ISingleStoreHandler interface {
|
||||||
IPurchasePlatformHandler
|
IPurchasePlatformHandler
|
||||||
|
ISingleStoreStoreSkuHandler
|
||||||
// SyncStoreCategory(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, isAsync bool) (hint string, err error)
|
// 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)
|
// 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) {
|
func GetSingleStoreVendorIDs() (vendorIDs []int) {
|
||||||
for k, v := range PurchasePlatformHandlers {
|
for k, v := range PurchasePlatformHandlers {
|
||||||
if _, ok := v.(ISingleStoreHandler); !ok {
|
if _, ok := v.(ISingleStoreHandler); ok {
|
||||||
vendorIDs = append(vendorIDs, k)
|
vendorIDs = append(vendorIDs, k)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ mtwmCallbackURL = "http://callback.jxc4.com"
|
|||||||
|
|
||||||
autonaviKey = "4427170f870af2110becb8852d36ab08"
|
autonaviKey = "4427170f870af2110becb8852d36ab08"
|
||||||
|
|
||||||
|
disableElm = true
|
||||||
|
disableWeimob = true
|
||||||
|
|
||||||
enableStoreWrite = false
|
enableStoreWrite = false
|
||||||
enableJdStoreWrite = false
|
enableJdStoreWrite = false
|
||||||
enableEbaiStoreWrite = false
|
enableEbaiStoreWrite = false
|
||||||
@@ -179,10 +182,6 @@ mtwmAppID = "4123"
|
|||||||
mtwmSecret = "df2c88338b85f830cebce2a9eab56628"
|
mtwmSecret = "df2c88338b85f830cebce2a9eab56628"
|
||||||
mtwmCallbackURL = "http://callback-jxgy.jxc4.com"
|
mtwmCallbackURL = "http://callback-jxgy.jxc4.com"
|
||||||
|
|
||||||
disableElm = true
|
|
||||||
disableMtwm = false
|
|
||||||
disableWeimob = true
|
|
||||||
|
|
||||||
enableStoreWrite = true
|
enableStoreWrite = true
|
||||||
enableJdStoreWrite = true
|
enableJdStoreWrite = true
|
||||||
enableEbaiStoreWrite = true
|
enableEbaiStoreWrite = true
|
||||||
@@ -249,7 +248,6 @@ jdToken = "df97f334-f7d8-4b36-9664-5784d8ae0baf"
|
|||||||
jdAppKey = "06692746f7224695ad4788ce340bc854"
|
jdAppKey = "06692746f7224695ad4788ce340bc854"
|
||||||
jdSecret = "d6b42a35a7414a5490d811654d745c84"
|
jdSecret = "d6b42a35a7414a5490d811654d745c84"
|
||||||
jdStorePageCookie = "5EOCZRXVCRXBTYD5EPV6FOXRCQWFFQO75FRMJ3BAKZ5JXY6XTJECMWXK5OZIPLZTUWZKZKXHXA6I7G3WMIKSWOHZIHRLNE5FZY3NBD6G5IMBOYHMJSJR3RF4TMZB2JEW2DF755YPFUSA6BMWI3KNLT3I4EAP2Z4JA6ZWAA34MNQX5P6LOI4EGG76QJU3G3VW7QFE6BAVAONMKBEHKNXNZGX3RQF7PHXDXSPJSY5XQEGM7IV2L7LKIG3M2D6QVSPEGQW4NV7SZ4TX32D2XQA7PIX46M"
|
jdStorePageCookie = "5EOCZRXVCRXBTYD5EPV6FOXRCQWFFQO75FRMJ3BAKZ5JXY6XTJECMWXK5OZIPLZTUWZKZKXHXA6I7G3WMIKSWOHZIHRLNE5FZY3NBD6G5IMBOYHMJSJR3RF4TMZB2JEW2DF755YPFUSA6BMWI3KNLT3I4EAP2Z4JA6ZWAA34MNQX5P6LOI4EGG76QJU3G3VW7QFE6BAVAONMKBEHKNXNZGX3RQF7PHXDXSPJSY5XQEGM7IV2L7LKIG3M2D6QVSPEGQW4NV7SZ4TX32D2XQA7PIX46M"
|
||||||
disableElm = true
|
|
||||||
|
|
||||||
ebaiSource = "62289"
|
ebaiSource = "62289"
|
||||||
ebaiSecret = "d3ec2358d6a819ea"
|
ebaiSecret = "d3ec2358d6a819ea"
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/elmapi"
|
"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"
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
"github.com/astaxie/beego"
|
"github.com/astaxie/beego"
|
||||||
)
|
)
|
||||||
@@ -17,9 +16,9 @@ type ElemeController struct {
|
|||||||
// https://open.shop.ele.me/openapi/documents/httppushmethod
|
// https://open.shop.ele.me/openapi/documents/httppushmethod
|
||||||
func (c *ElemeController) Msg() {
|
func (c *ElemeController) Msg() {
|
||||||
if c.Ctx.Input.Method() == http.MethodPost {
|
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 {
|
if callbackResponse == nil {
|
||||||
callbackResponse = elm.OnCallbackMsg(obj)
|
// callbackResponse = elm.OnCallbackMsg(obj)
|
||||||
}
|
}
|
||||||
c.Data["json"] = callbackResponse
|
c.Data["json"] = callbackResponse
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package controllers
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/tasks"
|
"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"
|
||||||
"git.rosy.net.cn/jx-callback/globals/api"
|
"git.rosy.net.cn/jx-callback/globals/api"
|
||||||
"github.com/astaxie/beego"
|
"github.com/astaxie/beego"
|
||||||
@@ -14,9 +13,9 @@ type WeimobController struct {
|
|||||||
|
|
||||||
func (c *WeimobController) onCallbackMsg() {
|
func (c *WeimobController) onCallbackMsg() {
|
||||||
if true { //c.Ctx.Input.Method() == http.MethodPost {
|
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 {
|
if callbackResponse == nil {
|
||||||
callbackResponse = wsc.OnCallbackMsg(msg)
|
// callbackResponse = wsc.OnCallbackMsg(msg)
|
||||||
}
|
}
|
||||||
c.Data["json"] = callbackResponse
|
c.Data["json"] = callbackResponse
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
|
|||||||
Reference in New Issue
Block a user