From b996ac21c040cf598416144e86099cdd28356587 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 1 Mar 2026 13:45:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=98=B2=E6=AD=A2=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=B6=88=E6=81=AF=E5=92=8C=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E9=A2=84=E8=AE=A1=E8=B4=B9=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/service/FeishuNotificationService.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/backend/app/service/FeishuNotificationService.php b/backend/app/service/FeishuNotificationService.php index 9c91239..0cdec49 100644 --- a/backend/app/service/FeishuNotificationService.php +++ b/backend/app/service/FeishuNotificationService.php @@ -688,6 +688,18 @@ class FeishuNotificationService error_log("🔧 updateActorMessageCard 被调用: order_id={$orderId}, node_id={$nodeId}, actorUserId={$actorUserId}, status={$status}"); try { + // 检查是否已经更新过(防止重复更新) + $existingUpdate = \app\model\FeishuMessage::where('order_id', $orderId) + ->where('node_id', $nodeId) + ->where('user_id', $actorUserId) + ->where('status', \app\model\FeishuMessage::STATUS_UPDATED) + ->first(); + + if ($existingUpdate) { + error_log("⚠️ 操作人消息已被更新过,跳过重复更新: message_id={$existingUpdate->message_id}"); + return true; + } + // 获取该操作人的消息 $message = \app\model\FeishuMessage::where('order_id', $orderId) ->where('node_id', $nodeId) @@ -708,7 +720,7 @@ class FeishuNotificationService return false; } - error_log("🔍 准备更新操作人消息: message_id={$message->message_id}, company_id={$companyId}, feishu_app_id={$feishuAppId}"); + error_log("🔍 准备更新操作人消息: message_id={$message->message_id}, company_id={$companyId}, feishu_app_id={$feishu_app_id}"); // 使用该消息对应的飞书应用配置 $this->companyId = $companyId;