diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs index 8aa23fd9..9e20df45 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs @@ -1171,7 +1171,7 @@ WHERE A.Id = '{id}'"; { course.CourseWareList = new List(); course.CourseTeacherList = new List(); - var courses = await Db.Queryable().Where(x => x.CourseSceneId == course.CourseSceneId && x.Status == Consts.DIC_COURSE_STATUS.RELEASED).ToListAsync(); + var courses = await Db.Queryable().Where(x => x.CourseSceneId == course.CourseSceneId && x.Status == Consts.DIC_COURSE_STATUS.RELEASED).OrderBy(x => x.SortNo).ToListAsync(); for (int i = 0; i < courses.Count; i++) { @@ -1179,13 +1179,13 @@ WHERE A.Id = '{id}'"; sql = @$"SELECT A.Id, A.Source, A.Link FROM Ghre_CourseWare A - WHERE A.CourseIds LIKE '%{course1.Id}%' AND A.IsEnable = 1"; + WHERE A.CourseIds LIKE '%{course1.Id}%' AND A.IsEnable = 1 order by SortNo ASC"; var courseWareList = await Db.Ado.SqlQueryAsync(sql); courseWareList.ForEach(x => { - x.CourseId = course.CourseId; - x.CourseName = course.CourseName; + x.CourseId = course1.Id; + x.CourseName = course1.CourseName; }); course.CourseWareList.AddRange(courseWareList);