diff --git a/backend/app/service/BusinessTripService.php b/backend/app/service/BusinessTripService.php index 9e951d8..138fe70 100644 --- a/backend/app/service/BusinessTripService.php +++ b/backend/app/service/BusinessTripService.php @@ -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) {