|
|
@ -970,6 +970,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
|
|
|
|
if (!isOk) { |
|
|
|
this.sendMsg(draftEntity.getCustomerId(), draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle())); |
|
|
|
this.wxmpMsg(draftEntity.getCustomerId(), draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle())); |
|
|
|
this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL, null); |
|
|
|
return null; |
|
|
|
} |
|
|
@ -1047,6 +1048,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("scanContent exception", e); |
|
|
|
this.sendMsg(draftEntity.getCustomerId(), draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle())); |
|
|
|
this.wxmpMsg(draftEntity.getCustomerId(), draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle())); |
|
|
|
this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL, null); |
|
|
|
} |
|
|
|
log.debug("scanContent result:{}", JSON.toJSONString(result)); |
|
|
@ -1084,6 +1086,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("scanAllPassPublishArticle update db exception", e); |
|
|
|
this.sendMsg(draft.getCustomerId(), draft.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draft.getTitle())); |
|
|
|
this.wxmpMsg(draft.getCustomerId(), draft.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draft.getTitle())); |
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); |
|
|
|
} |
|
|
|
} |
|
|
@ -1145,10 +1148,12 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
auditMsg = ModuleConstant.DRAFT_TITLE; |
|
|
|
} |
|
|
|
this.sendMsg(draft.getCustomerId(), draft.getTitle(), String.format(ModuleConstant.MSG_AUDIT_CONTENT, draft.getTitle(), auditMsg)); |
|
|
|
this.wxmpMsg(draft.getCustomerId(), draft.getTitle(), String.format(ModuleConstant.MSG_AUDIT_CONTENT, draft.getTitle(), auditMsg)); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("scanAllPassPublishArticle update db exception", e); |
|
|
|
this.sendMsg(draft.getCustomerId(), draft.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draft.getTitle())); |
|
|
|
this.wxmpMsg(draft.getCustomerId(), draft.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draft.getTitle())); |
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); |
|
|
|
} |
|
|
|
} |
|
|
@ -1170,6 +1175,23 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
formDTO.setReadFlag(ReadFlagConstant.UN_READ); |
|
|
|
return epmetMessageOpenFeignClient.saveUserMessage(formDTO); |
|
|
|
} |
|
|
|
/** |
|
|
|
* @param |
|
|
|
* @Description 发布文章审核给发布者推送微信订阅消息 |
|
|
|
* @Author sun |
|
|
|
**/ |
|
|
|
public Result wxmpMsg(String customerId, String title, String content) { |
|
|
|
List<WxSubscribeMessageFormDTO> msgList = new ArrayList<>(); |
|
|
|
WxSubscribeMessageFormDTO formDTO = new WxSubscribeMessageFormDTO(); |
|
|
|
formDTO.setCustomerId(customerId); |
|
|
|
formDTO.setClientType(AppClientConstant.APP_RESI); |
|
|
|
formDTO.setUserId(loginUserUtil.getLoginUserId()); |
|
|
|
formDTO.setBehaviorType(String.format(ModuleConstant.WXMP_MSG_TITLE, title)); |
|
|
|
formDTO.setMessageContent(content); |
|
|
|
formDTO.setMessageTime(new Date()); |
|
|
|
msgList.add(formDTO); |
|
|
|
return epmetMessageOpenFeignClient.sendWxSubscribeMessage(msgList); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void updateDraftPublishStatus(String draftId, String statusFlag, String titleAuditStatus) { |
|
|
|