Skip to content

Commit

Permalink
[Fix BUG : use Enterprise WeChat APP alarm notification,log print "in…
Browse files Browse the repository at this point in the history
…valid access token" ] (#1040)
  • Loading branch information
guojing1983 authored Jun 26, 2023
1 parent 44e34c1 commit 5fe96d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public void send(NoticeReceiver receiver, Alert alert) throws AlertNoticeExcepti
HttpEntity<WeChatAppDTO> weChatAppEntity = new HttpEntity<>(weChatAppDTO, headers);
ResponseEntity<WeChatAppReq> response = restTemplate.postForEntity(String.format(APP_MESSAGE_URL, accessToken), weChatAppEntity, WeChatAppReq.class);
if (Objects.nonNull(response.getBody()) && !Objects.equals(response.getBody().getErrCode(), 0)) {
log.warn("Send Enterprise WeChat App Error: {} Failed: {}", receiver.getHookUrl(), response.getBody().getErrMsg());
throw new AlertNoticeException("Http StatusCode " + response.getStatusCode());
log.warn("Send Enterprise WeChat App Error: {}", response.getBody().getErrMsg());
throw new AlertNoticeException("Http StatusCode " + response.getStatusCode() + " Error: " + response.getBody().getErrMsg());
}
}
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@
{{ 'alert.notice.type.weChatApp-corpId' | i18n }}
</nz-form-label>
<nz-form-control [nzSpan]="12" [nzErrorTip]="'validation.required' | i18n">
<input [(ngModel)]="receiver.wechatId" nz-input [required]="receiver.type === 10" name="corpId" type="text" />
<input [(ngModel)]="receiver.corpId" nz-input [required]="receiver.type === 10" name="corpId" type="text" />
</nz-form-control>
</nz-form-item>
<nz-form-item *ngIf="receiver.type === 10">
Expand Down

0 comments on commit 5fe96d7

Please sign in to comment.