1
This commit is contained in:
@@ -75,7 +75,12 @@ public class WeComApplicationTextPushService {
|
|||||||
String fishAid = StrUtil.trimToEmpty(goofishAgentId);
|
String fishAid = StrUtil.trimToEmpty(goofishAgentId);
|
||||||
if (StrUtil.isNotBlank(defAid) && rid.equals(defAid)) {
|
if (StrUtil.isNotBlank(defAid) && rid.equals(defAid)) {
|
||||||
if (StrUtil.isBlank(corpSecret)) {
|
if (StrUtil.isBlank(corpSecret)) {
|
||||||
throw new IllegalStateException("未配置 qywx.app.secret(与 agentId 对应)");
|
String hint = "";
|
||||||
|
if (StrUtil.isNotBlank(goofishSecret)) {
|
||||||
|
hint = "(已配置的是 goofishSecret,对应 AgentId " + fishAid + ";当前回调/推送为 "
|
||||||
|
+ defAid + ",须在 wxSend 配置 qywx.app.secret 或环境变量 QYWX_APP_SECRET)";
|
||||||
|
}
|
||||||
|
throw new IllegalStateException("未配置 qywx.app.secret(与 agentId 对应)" + hint);
|
||||||
}
|
}
|
||||||
sendTextWithAgent(toUser, content, defAid, corpSecret);
|
sendTextWithAgent(toUser, content, defAid, corpSecret);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ qywx:
|
|||||||
app:
|
app:
|
||||||
corpId: "ww929e7d6493c6336e"
|
corpId: "ww929e7d6493c6336e"
|
||||||
agentId: "1000012"
|
agentId: "1000012"
|
||||||
# 与 agentId 对应的应用 Secret(企微后台应用管理),用于 access_token + message/send
|
# 与 agentId 对应的应用 Secret(企微后台 → 应用管理 → Secret),用于 gettoken + message/send
|
||||||
secret: ""
|
secret: "ou35xJbpYvTAMMD0fcbTw9wsfVArETj0cR5plEfD-Ns"
|
||||||
# 闲鱼订单通知自建应用:POST /wx/send/goofish(corpid 仍用上面 corpId)
|
# 闲鱼订单通知自建应用:POST /wx/send/goofish(corpid 仍用上面 corpId)
|
||||||
# 生产建议仅通过环境变量注入,勿将真实 Secret 提交仓库
|
# 生产建议仅通过环境变量注入,勿将真实 Secret 提交仓库
|
||||||
goofishAgentId: "1000013"
|
goofishAgentId: "1000013"
|
||||||
|
|||||||
Reference in New Issue
Block a user