1.新增充值档位配置
2.新增充值/提现配置
This commit is contained in:
29
app/admin/controller/order/DepositChannelOrder.php
Normal file
29
app/admin/controller/order/DepositChannelOrder.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\order;
|
||||
|
||||
use app\common\library\game\DepositChannel;
|
||||
|
||||
/**
|
||||
* 渠道充值订单:仅列出已注册且启用的支付渠道(pay_channel)产生的充值单
|
||||
*/
|
||||
class DepositChannelOrder extends DepositOrder
|
||||
{
|
||||
/**
|
||||
* @param list<array<mixed>> $where
|
||||
*/
|
||||
protected function appendDepositOrderIndexWhere(array &$where, string $mainShort): void
|
||||
{
|
||||
if ($mainShort === '') {
|
||||
return;
|
||||
}
|
||||
$effective = DepositChannel::effectiveRowsFromDb();
|
||||
$codes = DepositChannel::enabledPayChannelCodes($effective);
|
||||
if ($codes === []) {
|
||||
$where[] = [$mainShort . '.pay_channel', '=', '__no_pay_channel__'];
|
||||
|
||||
return;
|
||||
}
|
||||
$where[] = [$mainShort . '.pay_channel', 'in', $codes];
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,7 @@ class DepositOrder extends Backend
|
||||
$channelIds = $this->getScopedChannelIdsForFilter();
|
||||
$where[] = [$mainShort . '.channel_id', 'in', $channelIds !== [] ? $channelIds : [0]];
|
||||
}
|
||||
$this->appendDepositOrderIndexWhere($where, $mainShort);
|
||||
|
||||
$res = $this->model
|
||||
->withJoin($this->withJoinTable, $this->withJoinType)
|
||||
@@ -72,6 +73,15 @@ class DepositOrder extends Backend
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 子类可追加列表过滤条件(例如仅展示已注册充值渠道的订单)
|
||||
*
|
||||
* @param list<array<mixed>> $where
|
||||
*/
|
||||
protected function appendDepositOrderIndexWhere(array &$where, string $mainShort): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* GET 时返回关联信息,便于前端详情弹窗直接渲染 user.username / channel.name;
|
||||
* POST 一律拒绝,保证充值订单的金额/状态只能由结算服务变更。
|
||||
|
||||
Reference in New Issue
Block a user