Files
MBTI_wang/api/scripts/run_push_hook_test.php
Ghost cf835ea585 feat: 管理端推送 Webhook 配置与出站推送链路接入
1、修复了管理端设置在推送开关/配置项上的联动与保存问题。

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

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

Made-with: Cursor
2026-04-15 15:07:36 +08:00

29 lines
703 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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);