Browse Source

Merge remote-tracking branch 'remotes/origin/dev_voice_attachment' into dev_temp

# Conflicts:
#	epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
master
jianjun 4 years ago
parent
commit
b272ae5afa
  1. 15
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  2. 6
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/constant/DraftConstant.java
  3. 5
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

15
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -119,16 +119,17 @@ public enum EpmetErrorCode {
OPER_CUSTOMER_FOOTBAR_EXISTS(8712, "footbar已存在"),
OPER_CUSTOMER_FOOTBAR_NOT_FOUND(8713, "footbar不存在"),
OPER_EXT_APP_SECRET_RESET_FAIL(8714, "秘钥更新失败"),
OPER_UPLOAD_IMG_TYPE_ERROR(8715, "请上传PNG格式的图片"),
OPER_UPLOAD_IMG_SIZE_ERROR(8716, "请上传200*200的图片"),
USER_LIST_ROLES_BY_KEY_FAIL(8717, "根据角色key查询角色列表失败"),
USER_LIST_ROLES_BY_KEY_FAIL(8715, "根据角色key查询角色列表失败"),
OPER_UPLOAD_IMG_TYPE_ERROR(8716, "请上传PNG格式的图片"),
OPER_UPLOAD_IMG_SIZE_ERROR(8717, "请上传200*200的图片"),
// 党建声音 前端提示 88段
DRAFT_CONTENT_IS_NULL(8801, "至少需要添加一个段落"),
ARTICLE_PUBLISH_ERROR(8801, "发布文章失败,请刷新重试"),
REPEATED_SUBMIT_ERROR(8998, "请勿重复提交"),
CUSTOMER_VALIDATE_ERROR(8999, "内部数据校验异常"),
CATEGORY_IS_NULL(8811, "请设置分类"),
DRAFT_CONTENT_FILENAME_NULL(8802, "附件名称不能为空"),
ARTICLE_PUBLISH_ERROR(8803, "发布文章失败,请刷新重试"),
REPEATED_SUBMIT_ERROR(8804, "请勿重复提交"),
CUSTOMER_VALIDATE_ERROR(8805, "内部数据校验异常"),
CATEGORY_IS_NULL(8806, "请设置分类"),
//公众号 865..开头的码
PUBLIC_NOT_EXISTS(8651,"手机号未注册,请先完成信息注册"),

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

@ -10,7 +10,7 @@ package com.epmet.constant;
/**
* 常量
*
*
* @author sun
* @since 1.0.0
*/
@ -66,6 +66,10 @@ public interface DraftConstant {
* 内容类型-文字
*/
String TEXT = "text";
/**
* 内容类型-文件
*/
String FILE = "file";
/**
* 草稿预览内容大小长度

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

@ -460,6 +460,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
for (int i = NumConstant.ZERO; i < contentList.size(); i++) {
DraftContentFromDTO.DraftContentDTO content = contentList.get(i);
if (DraftConstant.TEXT.equals(content.getContentType()) && StringUtils.isBlank(content.getFileName())){
throw new RenException(EpmetErrorCode.DRAFT_CONTENT_FILENAME_NULL.getCode());
}
DraftContentEntity entity = ConvertUtils.sourceToTarget(content, DraftContentEntity.class);
entity.setId(content.getDraftContentId());
entity.setCustomerId(tokenDto.getCustomerId());
@ -1377,4 +1380,4 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
});
articleTagsDao.addArticleTags(addArticleTags);
}
}
}

Loading…
Cancel
Save