| | |
| | | import me.zhengjie.modules.approval.service.dto.TemplateControlQueryCriteria; |
| | | import me.zhengjie.modules.approval.service.mapstruct.TemplateControlMapper; |
| | | import me.zhengjie.modules.constant.Constant; |
| | | import me.zhengjie.modules.quartz.service.impl.WeComServiceImpl; |
| | | import me.zhengjie.modules.system.service.DictDetailService; |
| | | import me.zhengjie.modules.system.service.dto.DictDetailDto; |
| | | import me.zhengjie.utils.*; |
| | |
| | | private final TemplateControlMapper templateControlMapper; |
| | | private final WxCpService wxCpService; |
| | | private final DictDetailService dictDetailService; |
| | | private final WeComServiceImpl weComService; |
| | | |
| | | @Override |
| | | public Map<String,Object> queryAll(TemplateQueryCriteria criteria, Pageable pageable){ |
| | |
| | | try { |
| | | if (criteria.getQueryNew()) { |
| | | // 获取企业微信Token |
| | | wxCpService.getAccessToken(true); |
| | | wxCpService.getAccessToken(); |
| | | |
| | | // 获取指定模版详细信息 |
| | | WxCpOaApprovalTemplateResult templateResult = wxCpService.getOaService().getTemplateDetail(criteria.getTemplateId()); |
| | |
| | | } |
| | | } catch (WxErrorException wxErrorException) { |
| | | wxErrorException.printStackTrace(); |
| | | weComService.sendNotice(Arrays.asList("YueYuHuanXiangQinYuFenDou"), "企微通信异常", String.format("<div class=\"normal\">异常方法:%s</div>" + |
| | | "<div class=\"highlight\">请前往API服务查看LOG。</div>", |
| | | "queryWeComTemplate"), Constant.WECOM_MESSAGE_TYPE_TEXTCARD); |
| | | throw new Exception("数据读取失败"); |
| | | } |
| | | } else { |