feat: 管理端推送 Webhook 配置与出站推送链路接入
1、修复了管理端设置在推送开关/配置项上的联动与保存问题。 2、新增 OutboundPushHookService、PushHook/InternalPushHook 接口、前端 PushHookConfigPanel 与小程序 pushHook 工具。 3、优化 Analyze/Auth/Test/支付回调触发路径,补充去重迁移脚本与实施文档。 Made-with: Cursor
This commit is contained in:
28
api/scripts/run_push_hook_test.php
Normal file
28
api/scripts/run_push_hook_test.php
Normal 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);
|
||||
Reference in New Issue
Block a user