|
@@ -71,6 +71,9 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> i
|
|
|
public void updateCategory(@NonNull Long id, @NonNull CategoryModifyParam param) {
|
|
|
Category category = AssertUtils.available(this.getById(id), "分类不存在");
|
|
|
CategoryCopier.INSTANCE.copying(param, category);
|
|
|
+ if(StringUtils.isEmpty(category.getParentId())){
|
|
|
+ category.setParentId(0L);
|
|
|
+ }
|
|
|
this.updateById(category);
|
|
|
}
|
|
|
|