Browse Source

Merge branch 'dev_voice' into dev

dev_shibei_match
sunyuchao 5 years ago
parent
commit
c0cab35821
  1. 8
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java
  2. 14
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

8
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/ArticleConstant.java

@ -36,9 +36,13 @@ public interface ArticleConstant {
*/
String SELECT_AGRNCY_EXCEPTION = "获取用户组织信息失败";
/**
* 下线文章操作记录表文案
* 下线文章操作记录表文案-全部下线
*/
String OFF_LINE_ARTICLE_MSG = "%s-%s下线文章【%s】";
String OFF_LINE_ALL_ARTICLE_MSG = "%s-%s下线文章【%s】";
/**
* 下线文章操作记录表文案-部分下线
*/
String OFF_LINE_ARTICLE_MSG = "%s-%s下线部分网格文章【%s】,下线网格:%s";
/**
* 发布文章操作记录表文案

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

@ -559,7 +559,19 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
recordEntity.setCustomerId(articleEntity.getCustomerId());
recordEntity.setArticleId(formDTO.getArticleId());
recordEntity.setOpUser(articleEntity.getPublisherName() + "-" + staffDTO.getRealName());
recordEntity.setContent(String.format(ArticleConstant.OFF_LINE_ARTICLE_MSG, articleEntity.getPublisherName(), staffDTO.getRealName(), articleEntity.getTitle()));
//下线文案,分为全部下线和部分下线
String content = "";
if (null == publishedList || publishedList.size() < NumConstant.ONE) {
content = String.format(ArticleConstant.OFF_LINE_ALL_ARTICLE_MSG, articleEntity.getPublisherName(), staffDTO.getRealName(), articleEntity.getTitle());
} else {
StringBuffer offLineRangeDesc = new StringBuffer();
offLineList.forEach(off -> {
offLineRangeDesc.append(offLineRangeDesc.length() > NumConstant.ZERO ? "、" : "");
offLineRangeDesc.append(off.getAgencyGridName());
});
content = String.format(ArticleConstant.OFF_LINE_ARTICLE_MSG, articleEntity.getPublisherName(), staffDTO.getRealName(), articleEntity.getTitle(), offLineRangeDesc);
}
recordEntity.setContent(content);
recordEntity.setOpType(ArticleConstant.OFFLINE);
recordEntity.setOpTime(date);
articleOperateRecordService.insert(recordEntity);

Loading…
Cancel
Save