65 lines
1.4 KiB
PHP
65 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace app\admin\lists\user_bill;
|
|
|
|
|
|
use app\admin\lists\BaseAdminDataLists;
|
|
use app\common\model\user_bill\UserBill;
|
|
use app\common\lists\ListsSearchInterface;
|
|
|
|
|
|
/**
|
|
* 资金记录列表
|
|
* Class UserBillLists
|
|
* @package app\admin\listsuser_bill
|
|
*/
|
|
class UserBillLists extends BaseAdminDataLists implements ListsSearchInterface
|
|
{
|
|
|
|
|
|
/**
|
|
* @notes 设置搜索条件
|
|
* @return \string[][]
|
|
* @author admin
|
|
* @date 2024/05/31 16:44
|
|
*/
|
|
public function setSearch(): array
|
|
{
|
|
return [
|
|
'=' => ['uid', 'type', 'create_time'],
|
|
];
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 获取资金记录列表
|
|
* @return array
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
* @throws \think\db\exception\DbException
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
* @author admin
|
|
* @date 2024/05/31 16:44
|
|
*/
|
|
public function lists(): array
|
|
{
|
|
return UserBill::where($this->searchWhere)
|
|
->field(['id', 'type', 'number', 'mark', 'create_time'])
|
|
->limit($this->limitOffset, $this->limitLength)
|
|
->order(['id' => 'desc'])
|
|
->select()
|
|
->toArray();
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 获取资金记录数量
|
|
* @return int
|
|
* @author admin
|
|
* @date 2024/05/31 16:44
|
|
*/
|
|
public function count(): int
|
|
{
|
|
return UserBill::where($this->searchWhere)->count();
|
|
}
|
|
|
|
} |