From 9ffb05bb49ffe62d7b7fe238e76d70151bad3f05 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 1 Mar 2026 14:11:48 +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 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/backend/app/service/FeishuNotificationService.php b/backend/app/service/FeishuNotificationService.php index 1eeecf1..c2ab700 100644 --- a/backend/app/service/FeishuNotificationService.php +++ b/backend/app/service/FeishuNotificationService.php @@ -154,7 +154,16 @@ 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("🔄 检测到自审批,发送卡片通知"); + } else { + error_log("📨 发送卡片消息: 不是自审批"); + } + + // 无论是否自审批,都发送卡片消息 $card = $this->buildApprovalCard($params, $user->company_id); $messageId = $this->sendMessage($feishuUserId, $card, $orderId, $nodeId, $userId);