|
@@ -53,7 +53,11 @@ public class ArticleCategoryServiceImpl implements ArticleCategoryService {
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Map<String, Object> insertArticleCategory(ArticleCategory articleCategory) {
|
|
|
-
|
|
|
+
|
|
|
+ System.out.println(articleCategory);
|
|
|
+
|
|
|
+ if (articleCategory.getParent_id() == null) articleCategory.setParent_id(-1L);
|
|
|
+
|
|
|
// 插入
|
|
|
articleCategoryDao.insert(articleCategory);
|
|
|
|
|
@@ -64,6 +68,9 @@ public class ArticleCategoryServiceImpl implements ArticleCategoryService {
|
|
|
.peek(item -> { ValidationUtil.validateObject(item, ArticleCategoryI18n.Create.class); })
|
|
|
.map(item -> { item.setArticle_category_id(article_category_id); return item; })
|
|
|
.collect(Collectors.toList());
|
|
|
+
|
|
|
+ System.out.println(translations);
|
|
|
+
|
|
|
articleCategoryI18nDao.insertBatch(translations);
|
|
|
|
|
|
return Map.of("article_category_id", article_category_id);
|