Skip to content

Commit

Permalink
[Fix BUG : use Enterprise WeChat APP alarm notification,log print inv…
Browse files Browse the repository at this point in the history
…alid access token ] (#1040)
  • Loading branch information
guojing1983 authored Jun 26, 2023
1 parent 5bd3f51 commit 7de83d1
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 7de83d1

Please sign in to comment.