|
@ -1824,6 +1824,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
tWrapper1.ne(ArticleContentEntity::getContentType,"file"); |
|
|
tWrapper1.ne(ArticleContentEntity::getContentType,"file"); |
|
|
tWrapper1.orderByDesc(ArticleContentEntity::getOrderNum); |
|
|
tWrapper1.orderByDesc(ArticleContentEntity::getOrderNum); |
|
|
List<ArticleContentEntity> contentEntityList = articleContentDao.selectList(tWrapper1); |
|
|
List<ArticleContentEntity> contentEntityList = articleContentDao.selectList(tWrapper1); |
|
|
|
|
|
resultDTO.setContentList(new ArrayList<>()); |
|
|
if (!CollectionUtils.isEmpty(contentEntityList)) { |
|
|
if (!CollectionUtils.isEmpty(contentEntityList)) { |
|
|
List<PublishedListResultDTO.Content> contentList = ConvertUtils.sourceToTarget(contentEntityList, PublishedListResultDTO.Content.class); |
|
|
List<PublishedListResultDTO.Content> contentList = ConvertUtils.sourceToTarget(contentEntityList, PublishedListResultDTO.Content.class); |
|
|
resultDTO.setContentList(contentList); |
|
|
resultDTO.setContentList(contentList); |
|
@ -1938,10 +1939,10 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
} |
|
|
} |
|
|
// 2.1 附件
|
|
|
// 2.1 附件
|
|
|
if(!CollectionUtils.isEmpty(formDTO.getFileList())){ |
|
|
if(!CollectionUtils.isEmpty(formDTO.getFileList())){ |
|
|
//
|
|
|
//把之前的附件删除,再插入
|
|
|
LambdaQueryWrapper<ArticleContentEntity> del=new LambdaQueryWrapper<>(); |
|
|
LambdaQueryWrapper<ArticleContentEntity> del=new LambdaQueryWrapper<>(); |
|
|
del.eq(ArticleContentEntity::getArticleId,formDTO.getArticleId()) |
|
|
del.eq(ArticleContentEntity::getArticleId,formDTO.getArticleId()) |
|
|
.ne(ArticleContentEntity::getContent,"rich_text"); |
|
|
.eq(ArticleContentEntity::getContentType,"file"); |
|
|
articleContentDao.delete(del); |
|
|
articleContentDao.delete(del); |
|
|
int orderNum=2; |
|
|
int orderNum=2; |
|
|
for(UpdateArticleFormDTO.ContentDTO file:formDTO.getFileList()){ |
|
|
for(UpdateArticleFormDTO.ContentDTO file:formDTO.getFileList()){ |
|
|