mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-19 11:40:05 +08:00
[修改][商品分类]分类只能存在2级
This commit is contained in:
parent
b89d7ff384
commit
5674bfafc8
@ -77,7 +77,7 @@ public class ProductCategoryServiceImpl implements ProductCategoryService {
|
||||
throw exception(CATEGORY_PARENT_NOT_EXISTS);
|
||||
}
|
||||
// 父分类不能是二级分类
|
||||
if (Objects.equals(id, ProductCategoryDO.PARENT_ID_NULL)) {
|
||||
if (!Objects.equals(category.getParentId(), ProductCategoryDO.PARENT_ID_NULL)) {
|
||||
throw exception(CATEGORY_PARENT_NOT_FIRST_LEVEL);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user