This commit is contained in:
苏尹岚
2021-03-09 11:03:48 +08:00
parent f66222cd30
commit ae08a80cd4
3 changed files with 9 additions and 9 deletions

View File

@@ -313,11 +313,11 @@ func (a *API) ShopAptitudeUpload(shopID string, baiduShopID int64, params map[st
}
//查询自配送物流信息
func (a *API) ShopDeliveryinfoGet(shopID string, baiduShopID int64) (err error) {
func (a *API) ShopDeliveryinfoGet(shopID string, baiduShopID int64) (shopInfoList []map[string]interface{}, err error) {
params := a.genShopIDParams(shopID, baiduShopID, 0)
_, err = a.AccessAPI("shop.deliveryinfo.get", params)
result, err := a.AccessAPI("shop.deliveryinfo.get", params)
if err == nil {
return nil
return utils.Slice2MapSlice(result.Data.([]interface{})), nil
}
return err
return shopInfoList, err
}

View File

@@ -53,7 +53,7 @@ func TestShopCreate(t *testing.T) {
}
func TestShopGet(t *testing.T) {
result, err := api.ShopGet2("", 32267674055) //2233065879 ,22267134648
result, err := api.ShopGet2("", 32267315064) //2233065879 ,22267134648
if err != nil {
t.Fatal(err)
} else {
@@ -243,9 +243,9 @@ func TestShopAptitudeUpload(t *testing.T) {
}
func TestShopDeliveryinfoGet(t *testing.T) {
err := api.ShopDeliveryinfoGet("", 32267674055)
result, err := api.ShopDeliveryinfoGet("", 32267315064)
if err != nil {
t.Fatal(err)
}
// t.Log(utils.Format4Output(result, false))
t.Log(utils.Format4Output(result, false))
}