This commit is contained in:
邹宗楠
2023-02-14 15:55:20 +08:00
3 changed files with 10 additions and 6 deletions

View File

@@ -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 {

View File

@@ -53,7 +53,11 @@ func TestShopCreate(t *testing.T) {
}
func TestShopGet(t *testing.T) {
<<<<<<< HEAD
result, err := api.ShopGet2("", 1101809925) //2233065879 ,22267134648
=======
result, err := api.ShopGet2("", 2235877567) //2233065879 ,22267134648
>>>>>>> c32151cdb461bbd605e7336062d7f9d3d22ef127
if err != nil {
t.Fatal(err)
} else {
@@ -89,9 +93,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 +124,9 @@ func TestShopStatusGet(t *testing.T) {
}
}
//todo 修改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)
}