fix: 修复消息卡片更新时缺少公司ID的问题
- 在 updateMessageCards 和 updateMessageCardsForPartialApprove 方法中 添加获取订单公司ID并设置飞书应用配置的逻辑 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user