mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-26 20:52:44 +08:00
Merge branch 'koogua/fixed-teacher-consults' into demo
This commit is contained in:
commit
45d93aec73
@ -30,10 +30,12 @@ class ConsultList extends LogicService
|
|||||||
$page = $pagerQuery->getPage();
|
$page = $pagerQuery->getPage();
|
||||||
$limit = $pagerQuery->getLimit();
|
$limit = $pagerQuery->getLimit();
|
||||||
|
|
||||||
|
$params['course_id'] = 0;
|
||||||
|
|
||||||
$courses = $this->findTeachingCourses($user->id);
|
$courses = $this->findTeachingCourses($user->id);
|
||||||
|
|
||||||
if ($courses->count() == 0) {
|
if ($courses->count() > 0) {
|
||||||
return [];
|
$params['course_id'] = kg_array_column($courses->toArray(), 'id');
|
||||||
}
|
}
|
||||||
|
|
||||||
$params['status'] = $params['status'] ?? null;
|
$params['status'] = $params['status'] ?? null;
|
||||||
@ -44,8 +46,6 @@ class ConsultList extends LogicService
|
|||||||
$params['replied'] = 1;
|
$params['replied'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$params['course_id'] = kg_array_column($courses->toArray(), 'id');
|
|
||||||
|
|
||||||
$pager = $this->paginate($params, $page, $limit);
|
$pager = $this->paginate($params, $page, $limit);
|
||||||
|
|
||||||
return $this->handleConsults($pager);
|
return $this->handleConsults($pager);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user