diff --git a/platformapi/ebaiapi/shop.go b/platformapi/ebaiapi/shop.go index 7f2249d2..11ef353d 100644 --- a/platformapi/ebaiapi/shop.go +++ b/platformapi/ebaiapi/shop.go @@ -285,3 +285,13 @@ func (a *API) ShopAptitudeGet(shopID string, baiduShopID int64) (shopInfoList [] } 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 +} diff --git a/platformapi/ebaiapi/shop_test.go b/platformapi/ebaiapi/shop_test.go index cc1f5ddb..4ffc5f31 100644 --- a/platformapi/ebaiapi/shop_test.go +++ b/platformapi/ebaiapi/shop_test.go @@ -52,9 +52,9 @@ func TestShopAptitudeGet(t *testing.T) { func TestShopUpdate(t *testing.T) { params := map[string]interface{}{ - KeyName: "好菜鲜生-测试店1", + KeyName: "好菜鲜生-测试店", KeyPhone: "13812345678", - KeyBaiduShopID: 2233976901, + KeyBaiduShopID: testShopBaiduID, "longitude": 116.307884, "latitude": 40.036828, "coord_type": "amap", @@ -129,3 +129,10 @@ func TestShopOffline(t *testing.T) { t.Fatal(err) } } + +func TestShopAnnouncementSet(t *testing.T) { + err := api.ShopAnnouncementSet("", testShopBaiduID, "测试公告123") + if err != nil { + t.Fatal(err) + } +} diff --git a/platformapi/jdapi/store_page_test.go b/platformapi/jdapi/store_page_test.go index a17097f4..bfcd08b9 100644 --- a/platformapi/jdapi/store_page_test.go +++ b/platformapi/jdapi/store_page_test.go @@ -228,7 +228,7 @@ func TestIsJdManagerUser(t *testing.T) { } func TestGetJdStoreLevel(t *testing.T) { - api.GetJdStoreLevel("320406", "11732427") + api.GetJdStoreLevel("320406", "11732427", 1) } func TestGetJdUpcCodeByName(t *testing.T) {