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);