From 82f9b9371ae8730db0f91514eab4d64dd14e0748 Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Mon, 29 Dec 2025 16:02:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cunkebao/controller/distribution/WithdrawalController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Server/application/cunkebao/controller/distribution/WithdrawalController.php b/Server/application/cunkebao/controller/distribution/WithdrawalController.php index 37fd76eb..4cdf7fb9 100644 --- a/Server/application/cunkebao/controller/distribution/WithdrawalController.php +++ b/Server/application/cunkebao/controller/distribution/WithdrawalController.php @@ -175,7 +175,6 @@ class WithdrawalController extends BaseController $amount = $this->request->param('amount', 0); // 金额单位:元 $companyId = $this->getUserInfo('companyId'); - $userId = $this->getUserInfo('id'); // 参数验证 if (empty($channelCode)) { @@ -228,6 +227,8 @@ class WithdrawalController extends BaseController // 统一使用渠道ID变量,后续逻辑仍然基于 channelId $channelId = $channel['id']; + // 从渠道获取创建者的userId,而不是当前登录用户的userId + $userId = intval($channel['userId'] ?? 0); // 检查渠道状态 if ($channel['status'] !== 'enabled') { @@ -309,6 +310,7 @@ class WithdrawalController extends BaseController ->field([ 'w.id', 'w.channelId', + 'w.userId', 'w.amount', 'w.status', 'w.payType',