Release: 修复自审批检测

This commit is contained in:
root
2026-02-28 14:37:07 +08:00
+2 -1
View File
@@ -310,12 +310,13 @@ class BusinessTripService
$notificationService->setAppByUser($approverId) $notificationService->setAppByUser($approverId)
->sendApprovalNotification([ ->sendApprovalNotification([
'user_id' => $approverId, 'user_id' => $approverId,
'applicant_id' => $approvalOrder->applicant_id, // 添加申请人ID用于自审批检测
'title' => '新的出差审批申请', 'title' => '新的出差审批申请',
'applicant' => $businessTrip->user->name, 'applicant' => $businessTrip->user->name,
'type' => '出差申请', 'type' => '出差申请',
'content' => $content, 'content' => $content,
'url' => $approvalUrl, 'url' => $approvalUrl,
'order_id' => $approvalOrder->id, // 添加 order_id 以显示审批按钮 'order_id' => $approvalOrder->id,
]); ]);
error_log("✅ 审批人通知成功: approver_id={$approverId}"); error_log("✅ 审批人通知成功: approver_id={$approverId}");
} catch (\Exception $e) { } catch (\Exception $e) {