This commit is contained in:
苏尹岚
2020-11-18 09:48:34 +08:00
parent 81b7fae762
commit 5a6dae8d53
2 changed files with 15 additions and 8 deletions

View File

@@ -46,6 +46,12 @@ func (a *APIManager) GetAPI(vendorID int, appOrgCode string) (pfAPI interface{})
pfAPI = api.MtwmAPI
case model.VendorIDEBAI:
pfAPI = api.EbaiAPI
case model.VendorIDJDShop:
if appOrgCode == "1" {
pfAPI = api.JdShopAPI
} else {
pfAPI = api.JdShop2API
}
}
return pfAPI
}
@@ -59,6 +65,8 @@ func (a *APIManager) GetAppOrgCodeList(vendorID int) (appOrgCodeList []string) {
appOrgCodeList = []string{api.MtwmAPI.GetAppID()}
case model.VendorIDEBAI:
appOrgCodeList = []string{api.EbaiAPI.GetSource()}
case model.VendorIDJDShop:
appOrgCodeList = []string{"1", "2"}
}
return appOrgCodeList
}