提现优化
This commit is contained in:
@@ -175,7 +175,6 @@ class WithdrawalController extends BaseController
|
|||||||
$amount = $this->request->param('amount', 0); // 金额单位:元
|
$amount = $this->request->param('amount', 0); // 金额单位:元
|
||||||
|
|
||||||
$companyId = $this->getUserInfo('companyId');
|
$companyId = $this->getUserInfo('companyId');
|
||||||
$userId = $this->getUserInfo('id');
|
|
||||||
|
|
||||||
// 参数验证
|
// 参数验证
|
||||||
if (empty($channelCode)) {
|
if (empty($channelCode)) {
|
||||||
@@ -228,6 +227,8 @@ class WithdrawalController extends BaseController
|
|||||||
|
|
||||||
// 统一使用渠道ID变量,后续逻辑仍然基于 channelId
|
// 统一使用渠道ID变量,后续逻辑仍然基于 channelId
|
||||||
$channelId = $channel['id'];
|
$channelId = $channel['id'];
|
||||||
|
// 从渠道获取创建者的userId,而不是当前登录用户的userId
|
||||||
|
$userId = intval($channel['userId'] ?? 0);
|
||||||
|
|
||||||
// 检查渠道状态
|
// 检查渠道状态
|
||||||
if ($channel['status'] !== 'enabled') {
|
if ($channel['status'] !== 'enabled') {
|
||||||
@@ -309,6 +310,7 @@ class WithdrawalController extends BaseController
|
|||||||
->field([
|
->field([
|
||||||
'w.id',
|
'w.id',
|
||||||
'w.channelId',
|
'w.channelId',
|
||||||
|
'w.userId',
|
||||||
'w.amount',
|
'w.amount',
|
||||||
'w.status',
|
'w.status',
|
||||||
'w.payType',
|
'w.payType',
|
||||||
|
|||||||
Reference in New Issue
Block a user