Browse Source

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

dev_shibei_match
jianjun 5 years ago
parent
commit
8c4b8fafaf
  1. 6
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
  2. 6
      epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java
  3. 17
      epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/exception/AuthException.java

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

@ -945,8 +945,8 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
textSyncScanResult = ScanContentUtils.textSyncScan(scanApiHost.concat(textSyncScanMethod),textScanParamDTO);
} catch (Exception e) {
log.error("scanContent exception",e);
this.sendMsg(draftEntity.getTitle(),String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle());
this.updateDraftPublishStatus(draftId,DraftConstant.AUDITFAIL)
this.sendMsg(draftEntity.getTitle(),String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle()));
this.updateDraftPublishStatus(draftId,DraftConstant.AUDITFAIL);
}
SyncScanResult result = new SyncScanResult();
if (imgSyncScanResult.isAllPass()){
@ -987,7 +987,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
} catch (Exception e) {
log.error("scanAllPassPublishArticle update db exception", e);
this.sendMsg(draft.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draft.getTitle()));
this.updateDraftPublishStatus(draftId,DraftConstant.AUDITFAIL)
this.updateDraftPublishStatus(draftId,DraftConstant.AUDITFAIL);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}

6
epmet-module/resi-voice/resi-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -18,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@ -67,7 +68,10 @@ public class ArticleServiceImpl implements ArticleService {
@Override
public List<ArticleWithTagsResultDTO> articleList(ArticlePageFormDTO articlePageFormDTO) {
Result<List<ArticleListResultDTO>> articles = govVoiceOpenFeignClient.resiArticleList(articlePageFormDTO);
if(articles.success() && null != articles.getData() && articles.getData().size() > NumConstant.ZERO){
if(articles.success()){
if(null == articles.getData() || articles.getData().size() <= NumConstant.ZERO){
return new ArrayList<>();
}
return articles.getData().stream().map(article -> {
ArticleWithTagsResultDTO artObj = ConvertUtils.sourceToTarget(article,ArticleWithTagsResultDTO.class);
artObj.setTagName(new HashSet<>());

17
epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/common/exception/AuthException.java

@ -1,17 +0,0 @@
package com.epmet.openapi.scan.common.exception;
import com.epmet.openapi.scan.common.enu.SysResponseEnum;
/**
* @author jianjun liu
* @date 2020-06-05 10:31
**/
public class AuthException extends RuntimeException {
private int code;
private String msg;
public AuthException() {
this.code = SysResponseEnum.AUTH_FAIL.getCode();
this.msg = SysResponseEnum.AUTH_FAIL.getMsg();
}
}
Loading…
Cancel
Save