fix: 新建商品时商品分类状态判断错误

This commit is contained in:
lizs 2023-04-16 21:53:24 +08:00
parent c67a7f7b7d
commit d5a48e63a3

View File

@ -100,7 +100,7 @@ public class ProductCategoryServiceImpl implements ProductCategoryService {
if (category == null) { if (category == null) {
throw exception(CATEGORY_NOT_EXISTS); throw exception(CATEGORY_NOT_EXISTS);
} }
if (Objects.equals(category.getStatus(), CommonStatusEnum.ENABLE.getStatus())) { if (Objects.equals(category.getStatus(), CommonStatusEnum.DISABLE.getStatus())) {
throw exception(CATEGORY_DISABLED, category.getName()); throw exception(CATEGORY_DISABLED, category.getName());
} }
} }