|
|
@@ -131,10 +131,11 @@ class Education
|
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
|
*/
|
|
|
public function getCourseInfo($gr_id) {
|
|
|
- $courses = EducationCourse::where('course_status', 1)
|
|
|
+ $courses = DB::table('education_courses')
|
|
|
+ ->where('course_status', 1)
|
|
|
->whereIn('gr_id', (array) $gr_id)
|
|
|
->where('course_audit', 1)
|
|
|
- ->select();
|
|
|
+ ->get();
|
|
|
$course_list = [];
|
|
|
foreach ($courses as $course) {
|
|
|
$course_info = [
|
|
|
@@ -145,9 +146,6 @@ class Education
|
|
|
];
|
|
|
$course_list[] = $course_info;
|
|
|
}
|
|
|
- if (!is_array($gr_id)) {
|
|
|
- $gr_id = [$gr_id];
|
|
|
- }
|
|
|
$count_and_all = $this->getCountAndAlll($gr_id);
|
|
|
$result = [
|
|
|
'course_list' => $course_list,
|