1
This commit is contained in:
@@ -244,6 +244,7 @@ func (a *API) ShopCategoryCreate(shopID string, parentID int64, name string, ran
|
||||
}
|
||||
|
||||
func (a *API) ShopCategoryGet(shopID string) (cats []*CategoryInfo, err error) {
|
||||
globals.SugarLogger.Debugf("ShopCategoryGet shopID====%s", shopID)
|
||||
result, err := a.AccessAPI("sku.shop.category.get", utils.Params2Map(KeyShopID, shopID))
|
||||
if err == nil {
|
||||
if inMap, ok := result.Data.(map[string]interface{}); ok {
|
||||
|
||||
@@ -53,7 +53,7 @@ func TestShopCreate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestShopGet(t *testing.T) {
|
||||
result, err := api.ShopGet2("", 508281125) //2233065879 ,22267134648
|
||||
result, err := api.ShopGet2("", 508415109) //2233065879 ,22267134648
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
@@ -89,9 +89,9 @@ func TestShopUpdate(t *testing.T) {
|
||||
//"city": "131",
|
||||
//"county": "1960",
|
||||
//"address": "北京市海淀区上地信息路甲9号",
|
||||
"takeout_shop_logo": "https://image-star.elemecdn.com/pb/b79d499b9b0be5deb3ee3ce71bf29ad0a8",
|
||||
"baidu_takeout_logo": "https://image-star.elemecdn.com/pb/b79d499b9b0be5deb3ee3ce71bf29ad0a8",
|
||||
"ele_takeout_logo": "https://image-star.elemecdn.com/pb/b79d499b9b0be5deb3ee3ce71bf29ad0a8",
|
||||
//"takeout_shop_logo": "https://image-star.elemecdn.com/pb/b79d499b9b0be5deb3ee3ce71bf29ad0a8",
|
||||
//"baidu_takeout_logo": "https://image-star.elemecdn.com/pb/b79d499b9b0be5deb3ee3ce71bf29ad0a8",
|
||||
//"ele_takeout_logo": "https://image-star.elemecdn.com/pb/b79d499b9b0be5deb3ee3ce71bf29ad0a8",
|
||||
//"baidu_takeout_logo" //takeoutShopLogo//baiduTakeoutLogo
|
||||
}
|
||||
err := api.ShopUpdate(params)
|
||||
@@ -120,8 +120,9 @@ func TestShopStatusGet(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
//修改ebai平台与本地映射
|
||||
func TestShopIDBatchUpdate(t *testing.T) {
|
||||
err := api.ShopIDBatchUpdate([]string{utils.Int2Str(testShopBaiduID)}, []string{"100077"})
|
||||
err := api.ShopIDBatchUpdate([]string{utils.Int2Str(2235877567)}, []string{"100920"})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ func New(appID, appKey, openID string, config ...*platformapi.APIConfig) *API {
|
||||
if appID == "" {
|
||||
return nil
|
||||
}
|
||||
globals.SugarLogger.Debugf("appID====%s,appKey====%s,openID====%s", appID, appKey, openID)
|
||||
return &API{
|
||||
appid: appID,
|
||||
appKey: appKey,
|
||||
@@ -79,7 +78,6 @@ func (a *API) AccessAPI(baseUrl, actionApi, method string, bizParams map[string]
|
||||
//完整请求url
|
||||
fullPath := utils.GenerateGetURL(baseUrl, actionApi, nil)
|
||||
globals.SugarLogger.Debugf("uupt fullPath======%s", fullPath)
|
||||
globals.SugarLogger.Debugf("uupt a.appid=====%s", a.appid)
|
||||
//发送请求
|
||||
sendUrl := func() *http.Request {
|
||||
var request *http.Request
|
||||
|
||||
Reference in New Issue
Block a user