1
This commit is contained in:
@@ -150,6 +150,39 @@ public class WxSendGoofishNotifyClient {
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务监控展示:闲鱼企微应用推送接口完整 URL(不发起请求)
|
||||
*/
|
||||
public String getGoofishPushEndpointDisplay() {
|
||||
if (!StringUtils.hasText(wxsendBaseUrl)) {
|
||||
return "";
|
||||
}
|
||||
return normalizeBase(wxsendBaseUrl) + "/wecom/goofish-active-push";
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务监控手动测试:经 wxSend 向企微「闲鱼」应用发一条文本。
|
||||
*
|
||||
* @return null 表示 HTTP 2xx 且调用链未抛错;非空为可直接展示的失败原因
|
||||
*/
|
||||
public String testGoofishNotify() {
|
||||
if (!StringUtils.hasText(wxsendBaseUrl)) {
|
||||
return "未配置 jarvis.wecom.wxsend-base-url";
|
||||
}
|
||||
if (!StringUtils.hasText(goofishPushSecret)) {
|
||||
return "未配置 jarvis.wecom.goofish-push-secret";
|
||||
}
|
||||
if (!StringUtils.hasText(goofishNotifyTouser)) {
|
||||
return "未配置 jarvis.wecom.goofish-notify-touser(接收人为空)";
|
||||
}
|
||||
String content = "【服务监控·闲鱼通知测试】RuoYi 手动触发 " + new java.util.Date();
|
||||
boolean ok = pushGoofishAgentText(null, content);
|
||||
if (ok) {
|
||||
return null;
|
||||
}
|
||||
return "推送未成功:请核对 wxSend 与企微应用、密钥及接收人,或查看服务端日志";
|
||||
}
|
||||
|
||||
private void postJson(String url, String toUser, String content) throws Exception {
|
||||
postJsonReturnsOk(url, toUser, content);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user