where('pay_type','=',$params['pay_type']); } if($params['pay_status']){ $model = $model->where('pay_status','=',$params['pay_status']); } // 查询列表数据 return $model->with(['user']) ->field("*,if(pay_time>0,FROM_UNIXTIME(pay_time,'%Y-%m-%d %H:%i:%s'),'') as pay_time") ->order(['create_time' => 'desc']) ->paginate($params); } }