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

64 lines
1.4 KiB
PHP

<?php
namespace app\adminapi\lists\lh;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\lh\LhCoin;
use app\common\lists\ListsSearchInterface;
/**
* 量化货币列表
* Class LhCoinLists
* @package app\adminapi\listslh
*/
class LhCoinLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author BD
* @date 2024/05/19 21:13
*/
public function setSearch(): array
{
return [
];
}
/**
* @notes 获取量化货币列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author BD
* @date 2024/05/19 21:13
*/
public function lists(): array
{
return LhCoin::where($this->searchWhere)
->field(['id', 'name', 'logo', 'symbol', 'symbol_market', 'price', 'buy_name', 'sale_name', 'is_show', 'sort'])
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()
->toArray();
}
/**
* @notes 获取量化货币数量
* @return int
* @author BD
* @date 2024/05/19 21:13
*/
public function count(): int
{
return LhCoin::where($this->searchWhere)->count();
}
}