fix: 修复多公司多飞书应用消息卡片更新失败问题

- feishu_message 表新增 company_id 和 feishu_app_id 字段追踪消息发送者
- 修改 FeishuMessage::saveMessage() 支持保存公司和飞书应用信息
- 修改 FeishuNotificationService 使用原始发送者的飞书应用配置更新消息
- 新增 HttpClient::httpPatchJson() 方法支持 PATCH 请求
- 文档更新:PROJECT_ISSUES.md 添加问题31,APPROVAL_NOTIFICATION_ARCHITECTURE.md 添加多公司架构说明

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-03-01 12:29:29 +08:00
parent 27cf1a555f
commit b90f901fd9
5 changed files with 586 additions and 78 deletions
+7 -1
View File
@@ -15,6 +15,8 @@ class FeishuMessage extends Model
'order_id',
'node_id',
'user_id',
'company_id',
'feishu_app_id',
'message_id',
'msg_token',
'status',
@@ -44,7 +46,9 @@ class FeishuMessage extends Model
int $nodeId,
int $userId,
string $messageId,
?string $msgToken = null
?string $msgToken = null,
?int $companyId = null,
?int $feishuAppId = null
): self {
return self::updateOrCreate(
[
@@ -55,6 +59,8 @@ class FeishuMessage extends Model
[
'message_id' => $messageId,
'msg_token' => $msgToken,
'company_id' => $companyId,
'feishu_app_id' => $feishuAppId,
'status' => self::STATUS_ACTIVE,
]
);