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
27
28
29
30
<?php
 
namespace app\operations\model\plus\vip;
 
use app\common\model\plus\vip\Apply as ApplyModel;
 
/**
 * VIP专区申请模型
 */
class Apply extends ApplyModel
{
    /**
     * 获取列表
     */
    public function getList($search)
    {
        $model = $this->with(['user', 'vipUser'])
            ->order(['create_time' => 'desc']);
            
        if (!empty($search['nick_name'])) {
            $model = $model->where('user.nickName', 'like', '%' . $search['nick_name'] . '%');
        }
 
        if (isset($search['apply_status']) && $search['apply_status'] > -1) {
            $model = $model->where('apply_status', '=', $search['apply_status']);
        }
 
        return $model->paginate($search['list_rows']);
    }
}