feat: 添加消息日志记录功能,用于调试消息走向

新增功能:
1. 创建 feishu_message_log 表,记录消息发送和更新操作
2. FeishuMessageLog 模型:管理消息日志
3. DebugController:提供调试接口查看日志

使用方式:
- GET /debug/message-logs?limit=50 - 查看最近50条日志
- GET /debug/message-logs?order_id=123 - 查看指定订单的日志
- POST /debug/clear-logs - 清空日志

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-28 18:47:23 +08:00
parent 1f72da9ec4
commit 5bbed98cf0
4 changed files with 250 additions and 2 deletions
+6
View File
@@ -24,6 +24,12 @@ Route::get('/login/callback', [app\controller\AuthController::class, 'qrcodeLogi
// 飞书卡片回调(不需要认证,飞书服务器直接调用)
Route::post('/feishu/card/callback', [app\controller\FeishuCardController::class, 'callback']);
// 调试接口(开发环境使用)
Route::group('/debug', function () {
Route::get('/message-logs', [app\controller\DebugController::class, 'messageLogs']);
Route::post('/clear-logs', [app\controller\DebugController::class, 'clearLogs']);
});
// 用户路由(需要认证)
Route::group('/api/v1/user', function () {
Route::get('/info', [app\controller\UserController::class, 'info']);