Commit Graph

3 Commits

Author SHA1 Message Date
root 68e0c261d8 feat: 完善业务审批消息链路
修改内容:
1. TestController - 添加 real 参数支持发送真实业务通知
2. BusinessTripService.sendApprovalNotification() - 传递 order_id

业务流程:
1. 用户创建申请 → 审批人收到带按钮的通知
2. 点击"通过"/"拒绝"按钮 → 跳转到审批详情页
3. 自动弹出确认框 → 完成审批
4. 通知下一节点审批人/申请人

按钮链接:
- 通过/拒绝:/approval/detail/{order_id}?action=approve|reject
- 查看详情:/business-trip/detail/{business_id}

测试命令:
- 测试消息: /api/v1/test/notification?user_id=1&order_id=64
- 真实业务: /api/v1/test/notification?user_id=1&order_id=64&real=1

相关文件:
- backend/app/controller/TestController.php
- backend/app/service/BusinessTripService.php

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:10:51 +08:00
root 0489da5e40 refactor: 重构多飞书应用绑定架构和数据库清理
- 新增 user_feishu_apps 表支持用户绑定多个飞书应用
- users 表添加唯一约束(公司内邮箱/手机唯一)
- 迁移现有飞书数据到 user_feishu_apps 表
- 清理冗余表(users_bak, user_feishu_binding)
- 废弃 users 表中的 feishu_user_id/feishu_open_id/tenant_key 字段
- 更新 FeishuNotificationService 使用新的数据获取方式
- User 模型新增 getFeishuUserId() 等便捷方法

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 16:27:33 +08:00
root 04947ae52d fix: 修复飞书通知模块API路径和卡片格式
- 修改API路径为 /open-apis/im/v1/messages (message/v4已废弃)
- 添加卡片config配置
- 修复content格式(直接传卡片对象,不需要包裹)
- 添加测试接口 /api/v1/test/notification

测试结果: 成功发送通知到李佳博(feishu_user_id: 481g947d)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:27:54 +08:00