quanwei
18 hours ago c441dea81bd86bdfb12dff35821fed51f4cc91c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
 
namespace app\operations\model\plus\vip;
 
use app\common\model\plus\vip\User as UserModel;
 
/**
 * VIP专区用户模型
 */
class User extends UserModel
{
    /**
     * 获取VIP用户列表
     */
    public function getList($search)
    {
        $model = $this->with(['user', 'referee', 'grade'])
            ->order(['create_time' => 'desc']);
            
        if (!empty($search['nick_name'])) {
            $model = $model->where('user.nickName', 'like', '%' . $search['nick_name'] . '%');
        }
 
        return $model->paginate($search['list_rows']);
    }
}