Browse Source

Merge remote-tracking branch 'remotes/origin/dev_voice' into dev

dev_shibei_match
jianjun 5 years ago
parent
commit
86491ef62c
  1. 5
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/DraftConstant.java
  2. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

5
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/DraftConstant.java

@ -71,4 +71,9 @@ public interface DraftConstant {
* 草稿预览内容大小长度
*/
Integer PREVIEW_CONTENT_MAX_LENGTH = 50;
/**
* 草稿预览内容超过50 添加...
*/
String PREVIEW_CONTENT_MORE = "...";
}

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

@ -227,7 +227,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
if (DraftConstant.TEXT.equals(fromDTO.getContentList().get(i).getContentType())) {
content = fromDTO.getContentList().get(i).getContent();
if (content.length() > DraftConstant.PREVIEW_CONTENT_MAX_LENGTH) {
content = content.substring(NumConstant.ZERO, DraftConstant.PREVIEW_CONTENT_MAX_LENGTH);
content = content.substring(NumConstant.ZERO, DraftConstant.PREVIEW_CONTENT_MAX_LENGTH).concat(DraftConstant.PREVIEW_CONTENT_MORE);
}
break;
}

Loading…
Cancel
Save