diff --git a/platformapi/mtwmapi/retail.go b/platformapi/mtwmapi/retail.go index 7e35022f..722f5f22 100644 --- a/platformapi/mtwmapi/retail.go +++ b/platformapi/mtwmapi/retail.go @@ -453,7 +453,10 @@ func IsErrCategoryExist(err error) (isExist bool) { } func IsErrCategoryNotExist(err error) (isNotExist bool) { - return utils.IsErrMatch(err, utils.Int2Str(ErrCodeSkuCategoryNotExist), nil) + return utils.IsErrMatch(err, utils.Int2Str(ErrCodeSkuCategoryNotExist), nil) || + utils.IsErrMatch(err, utils.Int2Str(ErrCodeParameterFormatWrong), []string{ + "门店内不存在该分类", + }) } func IsErrSkuNotExist(err error) (isExist bool) { diff --git a/platformapi/mtwmapi/retail_test.go b/platformapi/mtwmapi/retail_test.go index 9900e28b..ed562b76 100644 --- a/platformapi/mtwmapi/retail_test.go +++ b/platformapi/mtwmapi/retail_test.go @@ -88,6 +88,7 @@ func TestRetailGetSpTagIds(t *testing.T) { func TestRetailCatSkuBatchDelete(t *testing.T) { err := api.RetailCatSkuBatchDelete2(utils.GetUUID(), testPoiCode, nil, []string{"精品水果2"}, nil, nil, nil) + t.Log(IsErrCategoryNotExist(err)) if err != nil { t.Fatal(err) }