feat: 管理端推送 Webhook 配置与出站推送链路接入

1、修复了管理端设置在推送开关/配置项上的联动与保存问题。

2、新增 OutboundPushHookService、PushHook/InternalPushHook 接口、前端 PushHookConfigPanel 与小程序 pushHook 工具。

3、优化 Analyze/Auth/Test/支付回调触发路径,补充去重迁移脚本与实施文档。

Made-with: Cursor
This commit is contained in:
Ghost
2026-04-15 15:07:36 +08:00
parent c946584a7d
commit cf835ea585
29 changed files with 2964 additions and 111 deletions

View File

@@ -0,0 +1,28 @@
<?php
/**
* CLI执行一次出站 Hook 测试推送(与后台「发送测试推送」等价)
* 用法php scripts/run_push_hook_test.php [contextEnterpriseId]
* 示例php scripts/run_push_hook_test.php 0
*/
declare(strict_types=1);
namespace think;
use app\common\service\OutboundPushHookService;
$root = dirname(__DIR__);
require $root . '/vendor/autoload.php';
$app = new App($root);
$app->initialize();
$ctx = 0;
if (isset($argv[1]) && $argv[1] !== '' && ctype_digit((string) $argv[1])) {
$ctx = (int) $argv[1];
}
$r = OutboundPushHookService::sendTestPing($ctx);
echo json_encode($r, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . PHP_EOL;
exit(!empty($r['ok']) ? 0 : 2);