Commit d5a48e63a33605c8185c4ca41dac8a35f60867e3

Authored by lizs
1 parent c67a7f7b

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

yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/category/ProductCategoryServiceImpl.java
@@ -100,7 +100,7 @@ public class ProductCategoryServiceImpl implements ProductCategoryService { @@ -100,7 +100,7 @@ public class ProductCategoryServiceImpl implements ProductCategoryService {
100 if (category == null) { 100 if (category == null) {
101 throw exception(CATEGORY_NOT_EXISTS); 101 throw exception(CATEGORY_NOT_EXISTS);
102 } 102 }
103 - if (Objects.equals(category.getStatus(), CommonStatusEnum.ENABLE.getStatus())) { 103 + if (Objects.equals(category.getStatus(), CommonStatusEnum.DISABLE.getStatus())) {
104 throw exception(CATEGORY_DISABLED, category.getName()); 104 throw exception(CATEGORY_DISABLED, category.getName());
105 } 105 }
106 } 106 }