first commit

This commit is contained in:
Your Name
2026-01-19 14:19:22 +08:00
commit fe2d9c1868
4777 changed files with 665503 additions and 0 deletions

View 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();
}
}

View File

@@ -0,0 +1,96 @@
<?php
namespace app\adminapi\lists\lh;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\lh\LhRecord;
use app\common\lists\ListsSearchInterface;
/**
* 量化记录列表
* Class LhRecordLists
* @package app\adminapi\listslh
*/
class LhRecordLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author bd
* @date 2024/01/31 14:07
*/
public function setSearch(): array
{
return [
'=' => [ 'lr.sn', 'lr.coin_name'],
];
}
/**
* @notes 搜索条件
* @author 段誉
* @date 2023/2/24 16:08
*/
public function queryWhere()
{
$where = [];
// 用户编号
if (!empty($this->params['user_info'])) {
$where[] = ['u.sn|u.account|u.mobile', '=', $this->params['user_info']];
}
// 下单时间
if (!empty($this->params['start_time']) && !empty($this->params['end_time'])) {
$time = [strtotime($this->params['start_time']), strtotime($this->params['end_time'])];
$where[] = ['lr.create_time', 'between', $time];
}
return $where;
}
/**
* @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
{
$field = 'lr.id,lr.sn,lr.user_id,lr.coin_name,lr.coin_logo,lr.coin_symbol,lr.coin_buy_name,lr.coin_sale_name,lr.money,lr.income,lr.money_buy,lr.money_sale,lr.create_time';
$field .= ',u.account,u.sn as u_sn,u.mobile';
$record = LhRecord::alias('lr')
->join('user u', 'u.id = lr.user_id')
->field($field)
->where($this->queryWhere())
->where($this->searchWhere)
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()
->toArray();
return $record;
}
/**
* @notes 获取量化记录数量
* @return int
* @author BD
* @date 2024/05/19 21:13
*/
public function count(): int
{
return LhRecord::alias('lr')
->join('user u', 'u.id = lr.user_id')
->where($this->queryWhere())
->where($this->searchWhere)
->count();
}
}