1.压注记录修改为游玩记录

2.测试结算并测试
3.备份数据库
This commit is contained in:
2026-04-23 17:21:02 +08:00
parent 1531115a26
commit f2b4dab54f
20 changed files with 2130 additions and 94 deletions

View File

@@ -0,0 +1,79 @@
<?php
namespace app\admin\controller\admin;
use app\common\controller\Backend;
use support\Response;
use Webman\Http\Request as WebmanRequest;
/**
* 管理员钱包流水(只读)
*/
class AdminWalletRecord extends Backend
{
protected ?object $model = null;
protected bool $modelValidate = false;
protected string|array $quickSearchField = ['id', 'biz_type', 'ref_type', 'idempotency_key', 'remark'];
protected string|array $defaultSortField = ['id' => 'desc'];
protected string|array $orderGuarantee = ['id' => 'desc'];
protected array $withJoinTable = ['admin', 'channel', 'operatorAdmin'];
protected function initController(WebmanRequest $request): ?Response
{
$this->model = new \app\common\model\AdminWalletRecord();
return null;
}
protected function _index(): Response
{
if ($this->request && $this->request->get('select')) {
return $this->select($this->request);
}
list($where, $alias, $limit, $order) = $this->queryBuilder();
$table = strtolower($this->model->getTable());
$mainShort = $alias[$table] ?? '';
if ($mainShort !== '' && $this->auth && !$this->auth->isSuperAdmin()) {
$where[] = [$mainShort . '.admin_id', '=', intval($this->auth->id ?? 0)];
}
$res = $this->model
->withJoin($this->withJoinTable, $this->withJoinType)
->with($this->withJoinTable)
->visible([
'admin' => ['username'],
'channel' => ['name'],
'operatorAdmin' => ['username'],
])
->alias($alias)
->where($where)
->order($order)
->paginate($limit);
return $this->success('', [
'list' => $res->items(),
'total' => $res->total(),
'remark' => get_route_remark(),
]);
}
protected function _add(): Response
{
return $this->error('管理员钱包流水不允许手动新增');
}
protected function _edit(): Response
{
return $this->error('管理员钱包流水不允许手动编辑');
}
protected function _del(): Response
{
return $this->error('管理员钱包流水不允许删除');
}
}