提现优化

This commit is contained in:
wong
2025-12-29 16:02:24 +08:00
parent d9ee7e9402
commit 82f9b9371a

View File

@@ -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',