This commit is contained in:
邹宗楠
2022-10-20 16:59:12 +08:00
parent 76591a404a
commit 9ba6b8261f
4 changed files with 15 additions and 7 deletions

View File

@@ -19,10 +19,10 @@ func init() {
baseapi.Init(sugarLogger) baseapi.Init(sugarLogger)
// 菜市 // 菜市
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "") api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
// 果园 // 果园
api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "") //api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
//商超 //商超
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_kWP3yV8ei6reTseKnsxDJA") //token_nH_IlcWQKAkZBqklwItNRw //api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_kWP3yV8ei6reTseKnsxDJA") //token_nH_IlcWQKAkZBqklwItNRw

View File

@@ -7,7 +7,7 @@ import (
) )
func TestRetailCatList(t *testing.T) { func TestRetailCatList(t *testing.T) {
result, err := api.RetailCatList("11105778") result, err := api.RetailCatList("8694203 ")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
@@ -15,9 +15,11 @@ func TestRetailCatList(t *testing.T) {
} }
func TestRetailCatUpdate(t *testing.T) { func TestRetailCatUpdate(t *testing.T) {
err := api.RetailCatUpdate(testPoiCode, "测试一级类别", &Param4UpdateCat{ err := api.RetailCatUpdate("8694203", "时令鲜蔬", &Param4UpdateCat{
CategoryNameOrigin: "测试一级类别", CategoryNameOrigin: "1",
Sequence: 2, CategoryCodeOrigin: "1",
CategoryCode: "1",
Sequence: 3,
}) })
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)

View File

@@ -113,6 +113,7 @@ func (a *API) CreateStoreCommodity(skuParam *product_addV2_request.ProductAddV2P
request.Param = skuParam request.Param = skuParam
result, err := request.Execute(a.accessTokenObj) result, err := request.Execute(a.accessTokenObj)
globals.SugarLogger.Debugf("CreateStoreCommodity-------------api:=%s", utils.Format4Output(result, false))
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@@ -36,7 +36,7 @@ func TestCategory(t *testing.T) {
} }
func TestGetCatePropertyV2(t *testing.T) { func TestGetCatePropertyV2(t *testing.T) {
data, err := a.GetCatePropertyV2(22531) data, err := a.GetCatePropertyV2(29146)
fmt.Println("err=====", err) fmt.Println("err=====", err)
fmt.Println("data====", data) // 202209281558450102081001701D7B32C5 fmt.Println("data====", data) // 202209281558450102081001701D7B32C5
} }
@@ -327,3 +327,8 @@ func TestGetSkuList(t *testing.T) {
//StoreId: 63114504, //StoreId: 63114504,
}) })
} }
func Test11111(t *testing.T) {
fmt.Println((1 & 1) != 0)
fmt.Println(1&2 == 0)
}