fix: 添加applicant_id参数以支持自审批检测

- BusinessTripService: 传递 applicant_id 参数
- 确保自审批场景能正确发送文本消息而不是卡片
This commit is contained in:
root
2026-02-28 14:37:00 +08:00
parent dcde90a498
commit 094967cb02
+2 -1
View File
@@ -310,12 +310,13 @@ class BusinessTripService
$notificationService->setAppByUser($approverId)
->sendApprovalNotification([
'user_id' => $approverId,
'applicant_id' => $approvalOrder->applicant_id, // 添加申请人ID用于自审批检测
'title' => '新的出差审批申请',
'applicant' => $businessTrip->user->name,
'type' => '出差申请',
'content' => $content,
'url' => $approvalUrl,
'order_id' => $approvalOrder->id, // 添加 order_id 以显示审批按钮
'order_id' => $approvalOrder->id,
]);
error_log("✅ 审批人通知成功: approver_id={$approverId}");
} catch (\Exception $e) {