Browse Source

修改文章

dev
yinzuomei 3 years ago
parent
commit
a16e8a1c11
  1. 10
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

10
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -1849,8 +1849,18 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
baseDao.updateById(articleEntity);
// 2.内容
ArticleContentEntity articleContent = articleContentDao.selectByArticleId(formDTO.getArticleId());
if (null != articleContent) {
articleContent.setContent(formDTO.getContent());
articleContentDao.updateById(articleContent);
}else{
ArticleContentEntity articleContent1=new ArticleContentEntity();
articleContent1.setCustomerId(formDTO.getCustomerId());
articleContent1.setArticleId(formDTO.getArticleId());
articleContent1.setContent(formDTO.getContent());
articleContent1.setContentType("rich_text");
articleContent1.setOrderNum(NumConstant.ONE);
articleContentDao.insert(articleContent1);
}
// 3.操作记录
ArticleOperateRecordEntity articleOperateRecord = new ArticleOperateRecordEntity();
articleOperateRecord.setCustomerId(formDTO.getCustomerId());

Loading…
Cancel
Save