Files
zzp-server/app/adminapi/lists/user/UserTronLists.php
2026-01-19 14:19:22 +08:00

65 lines
1.5 KiB
PHP

<?php
namespace app\adminapi\lists\user;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\user\UserTron;
use app\common\lists\ListsSearchInterface;
/**
* 波场钱包列表
* Class UserTronLists
* @package app\adminapi\listsuser
*/
class UserTronLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author BD
* @date 2024/05/04 23:38
*/
public function setSearch(): array
{
return [
'=' => ['type'],
];
}
/**
* @notes 获取波场钱包列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author BD
* @date 2024/05/04 23:38
*/
public function lists(): array
{
return UserTron::where($this->searchWhere)
->field(['id', 'user_id', 'address', 'key', 'qrcode', 'money_trx', 'money_usdt', 'sort', 'type', 'create_time'])
->append(['user_info'])
->limit($this->limitOffset, $this->limitLength)
->order(['sort' => 'desc','id' => 'desc'])
->select()
->toArray();
}
/**
* @notes 获取波场钱包数量
* @return int
* @author BD
* @date 2024/05/04 23:38
*/
public function count(): int
{
return UserTron::where($this->searchWhere)->count();
}
}