|
|
@@ -83,18 +83,4 @@ public class CorpwxHttp {
|
|
|
log.info("获取企业微信紧急消息推送ACCESS_TOKEN: {}", corpwxUrgentMsgToken);
|
|
|
AccessTokenUtil.getInstance().set("corpwxUrgentMsgToken",corpwxUrgentMsgToken);
|
|
|
}
|
|
|
-
|
|
|
- public void getFilePushToken() {
|
|
|
- if (StrUtil.isBlank(corpwx.getFilePushSecret())) {
|
|
|
- throw new BizException(ExceptionEnum.NO_CONFIGURATION);
|
|
|
- }
|
|
|
- String url = tokenApiUrl + corpwx.getFilePushSecret();
|
|
|
- JSONObject json = template.getForObject(url, JSONObject.class);
|
|
|
- if (json == null) {
|
|
|
- throw new BizException(ExceptionEnum.API_ERROR);
|
|
|
- }
|
|
|
- String corpwxFilePushToken = json.getString("access_token");
|
|
|
- log.info("获取企业微信发送文件ACCESS_TOKEN: {}", corpwxFilePushToken);
|
|
|
- AccessTokenUtil.getInstance().set("corpwxFilePushToken", corpwxFilePushToken);
|
|
|
- }
|
|
|
}
|