master
ck 5 years ago
parent bdfe500d27
commit f24e3a201d

@ -242,7 +242,6 @@ public class ArticleSerivceImpl implements ArticleSerive {
Category secondCategory = categoryMapper.selectByPrimaryKey(secondCategoryId);
ArticleVo articleVo = new ArticleVo();
articleVo.setTitle(article.getTitle());
// articleVo.setFirstCategory(firstCategoryId);
articleVo.setSecondCategory(secondCategoryId);
articleVo.setContent(article.getContent());
articleVo.setFileType(article.getFileType());
@ -255,7 +254,9 @@ public class ArticleSerivceImpl implements ArticleSerive {
if (null != firstCategoryList && firstCategoryList.size()>0 ){
List<String> firstCategoryNameList = new ArrayList<>();
List<String> firstSortNumList = new ArrayList<>();
List<String> firstCategoryIdList = new ArrayList<>();
for (ArticleCategory articleCategory:firstCategoryList){
firstCategoryIdList.add(String.valueOf(articleCategory.getCategoryId()));
Category category = categoryMapper.selectByPrimaryKey(articleCategory.getCategoryId());
firstCategoryNameList.add(category.getName());
if (category.getSortNum()!=null){
@ -266,8 +267,10 @@ public class ArticleSerivceImpl implements ArticleSerive {
}
String firstCategoryName = String.join(",", firstCategoryNameList);
String firstSortNum = String.join(",", firstSortNumList);
String firstCategoryId = String.join(",", firstCategoryIdList);
articleVo.setFirstCategoryName(firstCategoryName);
articleVo.setFirstSortNum(firstSortNum);
articleVo.setFirstCategoryId(firstCategoryId);
}
if (null != secondCategory ){
articleVo.setSecondCategoryName(secondCategory.getName());

@ -13,6 +13,8 @@ public class ArticleVo extends Article {
private String firstSortNum;
private String firstCategoryId;
private Integer secondSortNum;
private Integer firstLevel;

Loading…
Cancel
Save