From 9b8dfd9c6c43fdcb312cff447a0ad9ad5106455a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 30 Jun 2023 10:38:21 +0800 Subject: [PATCH] 1 --- platformapi/tao_vegetable/store_categary.go | 5 +++-- platformapi/tao_vegetable/store_test.go | 8 +++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/platformapi/tao_vegetable/store_categary.go b/platformapi/tao_vegetable/store_categary.go index b3d66b00..8e9e816a 100644 --- a/platformapi/tao_vegetable/store_categary.go +++ b/platformapi/tao_vegetable/store_categary.go @@ -5,6 +5,7 @@ import ( "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability587" "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability587/domain" "git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability587/request" + "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/globals" "fmt" @@ -62,8 +63,8 @@ func (a *API) GetStoreCategoryInfo(code string) (*CategoryInfo, error) { func (a *API) AddStoreCategoryInfo(param *request.AlibabaWdkSkuCategoryAddRequest) (string, error) { globals.SugarLogger.Debugf("进入 AddStoreCategoryInfo") storeCategory := ability587.NewAbility587(&a.client) - resp, _ := storeCategory.AlibabaWdkSkuCategoryAdd(param, a.token) - + resp, err := storeCategory.AlibabaWdkSkuCategoryAdd(param, a.token) + globals.SugarLogger.Debugf("进入 AddStoreCategoryInfo : %s,%v", utils.Format4Output(resp, false), err) if !*resp.Result.Success { return "", fmt.Errorf(*resp.Result.ErrMsg) } diff --git a/platformapi/tao_vegetable/store_test.go b/platformapi/tao_vegetable/store_test.go index 0f703429..21b10132 100644 --- a/platformapi/tao_vegetable/store_test.go +++ b/platformapi/tao_vegetable/store_test.go @@ -53,11 +53,9 @@ func TestGetStoreAllCategory(t *testing.T) { func TestAddCategory(t *testing.T) { data, err := apiTao.AddStoreCategoryInfo(&request.AlibabaWdkSkuCategoryAddRequest{Param: &domain.AlibabaWdkSkuCategoryAddCategoryDo{ - Code: utils.String2Pointer("127382"), - Name: utils.String2Pointer("赠品专区"), - Leaf: utils.Bool2Point(false), - Desc: utils.String2Pointer("叶菜"), - SortOrder: utils.Int64ToPointer(3), + Code: utils.String2Pointer("127382"), + Name: utils.String2Pointer("赠品专区"), + Leaf: utils.Bool2Point(false), }}) globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false)) globals.SugarLogger.Debugf("err := %s", utils.Format4Output(err, false))