From df02078fada7bda5f3eb042a466f424c95582299 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 1 Mar 2026 11:51:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=8D=A1=E7=89=87=E6=9B=B4=E6=96=B0=E6=97=B6=E7=BC=BA=E5=B0=91?= =?UTF-8?q?=E5=85=AC=E5=8F=B8ID=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 updateMessageCards 和 updateMessageCardsForPartialApprove 方法中 添加获取订单公司ID并设置飞书应用配置的逻辑 Co-Authored-By: Claude Opus 4.6 --- backend/app/service/FeishuNotificationService.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backend/app/service/FeishuNotificationService.php b/backend/app/service/FeishuNotificationService.php index cb3061a..4d3a6bb 100644 --- a/backend/app/service/FeishuNotificationService.php +++ b/backend/app/service/FeishuNotificationService.php @@ -677,6 +677,12 @@ class FeishuNotificationService return true; } + // 获取订单以确定公司ID,设置飞书应用配置 + $order = \app\model\ApprovalOrder::find($orderId); + if ($order && $order->company_id) { + $this->setAppByUser($excludeUserId, $order->company_id); + } + $token = $this->getAccessToken(); $statusText = $status === 'approved' ? '已通过' : '已拒绝'; $statusColor = $status === 'approved' ? 'green' : 'red'; @@ -816,6 +822,12 @@ class FeishuNotificationService return true; } + // 获取订单以确定公司ID,设置飞书应用配置 + $order = \app\model\ApprovalOrder::find($orderId); + if ($order && $order->company_id) { + $this->setAppByUser($excludeUserId, $order->company_id); + } + $token = $this->getAccessToken(); $remainingCount = $totalCount - $approvedCount;