first commit
This commit is contained in:
64
app/adminapi/lists/lh/LhCoinLists.php
Normal file
64
app/adminapi/lists/lh/LhCoinLists.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user