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))