mtwmapi.IsErrCategoryNotExist考虑使用RetailCatSkuBatchDelete2的情况
This commit is contained in:
@@ -453,7 +453,10 @@ func IsErrCategoryExist(err error) (isExist bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func IsErrCategoryNotExist(err error) (isNotExist 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) {
|
func IsErrSkuNotExist(err error) (isExist bool) {
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ func TestRetailGetSpTagIds(t *testing.T) {
|
|||||||
|
|
||||||
func TestRetailCatSkuBatchDelete(t *testing.T) {
|
func TestRetailCatSkuBatchDelete(t *testing.T) {
|
||||||
err := api.RetailCatSkuBatchDelete2(utils.GetUUID(), testPoiCode, nil, []string{"精品水果2"}, nil, nil, nil)
|
err := api.RetailCatSkuBatchDelete2(utils.GetUUID(), testPoiCode, nil, []string{"精品水果2"}, nil, nil, nil)
|
||||||
|
t.Log(IsErrCategoryNotExist(err))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user