41 lines
955 B
PHP
Executable File
41 lines
955 B
PHP
Executable File
<?php
|
|
|
|
namespace app\common\model;
|
|
|
|
use app\common\model\Base;
|
|
use think\Model;
|
|
|
|
class ProfitPay extends Base
|
|
{
|
|
|
|
// 设置当前模型对应的完整数据表名称
|
|
protected $table = 'profit_pay';
|
|
|
|
/**
|
|
* 获取列表
|
|
*/
|
|
public static function getList($where = [], $field = '*', $order = '', $pageSize = "15")
|
|
{
|
|
$list = self::where($where)
|
|
->field($field)
|
|
->order($order)
|
|
->paginate(['list_rows' => $pageSize, 'query' => request()->param()]);
|
|
$page = $list->render();
|
|
$data['list'] = $list->toArray()['data'];
|
|
$data['count'] = $list->total();
|
|
$data['last_page'] = $list->toArray()['last_page'];
|
|
$data['page'] = $page;
|
|
return $data;
|
|
}
|
|
|
|
|
|
/**
|
|
* 查询用户信息
|
|
*/
|
|
public function userinfo()
|
|
{
|
|
return $this->hasOne('app\\common\\model\\User', 'id', 'user_id')->field('id,nickname,headimg');
|
|
}
|
|
|
|
|
|
} |