From ab49511e7524d57fc5a3ed8951bb3e2153781839 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 1 Mar 2026 14:11:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=87=AA=E5=AE=A1=E6=89=B9=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E4=B9=9F=E5=8F=91=E9=80=81=E5=8D=A1=E7=89=87=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除自审批检测逻辑,让所有审批消息(包括自审批)都发送卡片样式消息,提升用户体验一致性。 Co-Authored-By: Claude Opus 4.6 --- backend/app/service/FeishuNotificationService.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/backend/app/service/FeishuNotificationService.php b/backend/app/service/FeishuNotificationService.php index 04f328f..1eeecf1 100644 --- a/backend/app/service/FeishuNotificationService.php +++ b/backend/app/service/FeishuNotificationService.php @@ -154,15 +154,7 @@ class FeishuNotificationService return false; } - // 检查是否是申请人自己 - 发送文本消息而不是卡片 - error_log("🔍 自审批检查前: applicant_id=" . var_export($applicantId, true) . ", user_id=" . var_export($userId, true)); - - if ($applicantId && (int)$applicantId === (int)$userId) { - error_log("🔄 检测到自审批,发送文本通知而不是卡片"); - return $this->sendTextNotification($feishuUserId, $params); - } - - error_log("📨 发送卡片消息: 不是自审批"); + // 发送卡片消息(包括自审批场景) $card = $this->buildApprovalCard($params, $user->company_id); $messageId = $this->sendMessage($feishuUserId, $card, $orderId, $nodeId, $userId);