Browse Source

发送消息

dev_shibei_match
jianjun 5 years ago
parent
commit
b6bc88db44
  1. 12
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

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

@ -922,7 +922,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
}
if (!isOk) {
this.sendMsg(draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle()));
this.sendMsg(draftEntity.getCustomerId(),draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle()));
this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL);
return null;
}
@ -989,7 +989,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
}
} catch (Exception e) {
log.error("scanContent exception", e);
this.sendMsg(draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle()));
this.sendMsg(draftEntity.getCustomerId(),draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle()));
this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL);
}
log.debug("scanContent result:{}", JSON.toJSONString(result));
@ -1025,7 +1025,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.sendMsg(draft.getCustomerId(),draft.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draft.getTitle()));
this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
@ -1058,7 +1058,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.sendMsg(draft.getCustomerId(), draft.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draft.getTitle()));
this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL);
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg());
}
@ -1069,9 +1069,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
return this.saveOrUpdateContent(tokenDto, fromDTO, false);
}
public Result sendMsg(String title,String content) {
public Result sendMsg(String customerId, String title,String content) {
UserMessageFormDTO formDTO = new UserMessageFormDTO();
formDTO.setCustomerId(loginUserUtil.getLoginUserApp());
formDTO.setCustomerId(customerId);
formDTO.setGridId("");
formDTO.setUserId(loginUserUtil.getLoginUserId());
formDTO.setApp(AppClientConstant.APP_GOV);

Loading…
Cancel
Save