新增饿百设置门店公告接口
This commit is contained in:
@@ -285,3 +285,13 @@ func (a *API) ShopAptitudeGet(shopID string, baiduShopID int64) (shopInfoList []
|
|||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *API) ShopAnnouncementSet(shopID string, baiduShopID int64, content string) (err error) {
|
||||||
|
params := a.genShopIDParams(shopID, baiduShopID, 0)
|
||||||
|
params["content"] = content
|
||||||
|
_, err = a.AccessAPI("shop.announcement.set", params)
|
||||||
|
if err == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ func TestShopAptitudeGet(t *testing.T) {
|
|||||||
|
|
||||||
func TestShopUpdate(t *testing.T) {
|
func TestShopUpdate(t *testing.T) {
|
||||||
params := map[string]interface{}{
|
params := map[string]interface{}{
|
||||||
KeyName: "好菜鲜生-测试店1",
|
KeyName: "好菜鲜生-测试店",
|
||||||
KeyPhone: "13812345678",
|
KeyPhone: "13812345678",
|
||||||
KeyBaiduShopID: 2233976901,
|
KeyBaiduShopID: testShopBaiduID,
|
||||||
"longitude": 116.307884,
|
"longitude": 116.307884,
|
||||||
"latitude": 40.036828,
|
"latitude": 40.036828,
|
||||||
"coord_type": "amap",
|
"coord_type": "amap",
|
||||||
@@ -129,3 +129,10 @@ func TestShopOffline(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestShopAnnouncementSet(t *testing.T) {
|
||||||
|
err := api.ShopAnnouncementSet("", testShopBaiduID, "测试公告123")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ func TestIsJdManagerUser(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGetJdStoreLevel(t *testing.T) {
|
func TestGetJdStoreLevel(t *testing.T) {
|
||||||
api.GetJdStoreLevel("320406", "11732427")
|
api.GetJdStoreLevel("320406", "11732427", 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetJdUpcCodeByName(t *testing.T) {
|
func TestGetJdUpcCodeByName(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user