fix: 自审批场景也发送卡片样式消息
保留自审批检测逻辑,但将自审批时的文本消息改为卡片消息,保持消息样式一致。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user