|
@@ -60,6 +60,7 @@ public class GoodCategoryServiceImpl implements GoodCategoryService {
|
|
|
Long good_category_id = goodCategory.getId();
|
|
|
List<GoodCategoryI18n> translations = goodCategory.getTranslations().stream()
|
|
|
.peek(item -> { ValidationUtil.validateObject(item, GoodCategoryI18n.Create.class); })
|
|
|
+ .map(item -> { item.setGood_category_id(good_category_id); return item; })
|
|
|
.collect(Collectors.toList());
|
|
|
goodCategoryI18nDao.insertBatch(translations);
|
|
|
|
|
@@ -85,6 +86,7 @@ public class GoodCategoryServiceImpl implements GoodCategoryService {
|
|
|
// 批量更新 (翻译字段)
|
|
|
List<GoodCategoryI18n> translations = goodCategory.getTranslations().stream()
|
|
|
.peek(item -> { ValidationUtil.validateObject(item, GoodCategoryI18n.Update.class); })
|
|
|
+ .map(item -> { item.setGood_category_id(good_category_id); return item; })
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
goodCategoryI18nDao.updateBatch(translations);
|