...
|
...
|
@@ -82,23 +82,25 @@ class Student extends Api |
|
|
|
|
|
$page = $this->request->param('page', 1, 'int');
|
|
|
$size = $this->request->param('size', 10, 'int');
|
|
|
$type = $this->request->param('type', 1, 'int');
|
|
|
$type = $this->request->param('type', 0, 'int');
|
|
|
$universityId = $this->request->param('university_id', 0, 'int');
|
|
|
$graduatedId = $this->request->param('graduated_id', 0, 'int');
|
|
|
$upId = $this->request->param('up_id', 0, 'int');
|
|
|
|
|
|
$where['show_switch'] = ['=', 1];
|
|
|
$student = new StudentModel();
|
|
|
// 获取学校
|
|
|
$studentInfo = $student->infoByUserIdCanShow($userId);
|
|
|
if(!$studentInfo) {
|
|
|
$this->error('您的提交有误');
|
|
|
}
|
|
|
|
|
|
if($type) { // 学校限制
|
|
|
if(!in_array($type, [1, 2, 3])) {
|
|
|
$this->error('您的提交有误');
|
|
|
}
|
|
|
|
|
|
// 获取学校
|
|
|
$studentInfo = $student->infoByUserIdCanShow($userId);
|
|
|
if(!$studentInfo) {
|
|
|
$this->error('您的提交有误');
|
|
|
} else {
|
|
|
$type = bcadd($studentInfo['vip_level'], 1, 0);
|
|
|
}
|
|
|
|
|
|
$schoolIds = [];
|
...
|
...
|
@@ -124,7 +126,6 @@ class Student extends Api |
|
|
if($schoolIds) {
|
|
|
$where['school_id'] = ['in', $schoolIds];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if($universityId) {
|
|
|
$where['university_id'] = ['=', $universityId];
|
...
|
...
|
|