|
|
@ -1171,7 +1171,7 @@ WHERE A.Id = '{id}'"; |
|
|
|
{ |
|
|
|
{ |
|
|
|
course.CourseWareList = new List<Ghre_StudyRecordCourseWare>(); |
|
|
|
course.CourseWareList = new List<Ghre_StudyRecordCourseWare>(); |
|
|
|
course.CourseTeacherList = new List<Ghre_StudyRecordCourseTeacher>(); |
|
|
|
course.CourseTeacherList = new List<Ghre_StudyRecordCourseTeacher>(); |
|
|
|
var courses = await Db.Queryable<Ghre_Course>().Where(x => x.CourseSceneId == course.CourseSceneId && x.Status == Consts.DIC_COURSE_STATUS.RELEASED).ToListAsync(); |
|
|
|
var courses = await Db.Queryable<Ghre_Course>().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++) |
|
|
|
for (int i = 0; i < courses.Count; i++) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1179,13 +1179,13 @@ WHERE A.Id = '{id}'"; |
|
|
|
|
|
|
|
|
|
|
|
sql = @$"SELECT A.Id, A.Source, A.Link
|
|
|
|
sql = @$"SELECT A.Id, A.Source, A.Link
|
|
|
|
FROM Ghre_CourseWare A |
|
|
|
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<Ghre_StudyRecordCourseWare>(sql); |
|
|
|
var courseWareList = await Db.Ado.SqlQueryAsync<Ghre_StudyRecordCourseWare>(sql); |
|
|
|
courseWareList.ForEach(x => |
|
|
|
courseWareList.ForEach(x => |
|
|
|
{ |
|
|
|
{ |
|
|
|
x.CourseId = course.CourseId; |
|
|
|
x.CourseId = course1.Id; |
|
|
|
x.CourseName = course.CourseName; |
|
|
|
x.CourseName = course1.CourseName; |
|
|
|
}); |
|
|
|
}); |
|
|
|
course.CourseWareList.AddRange(courseWareList); |
|
|
|
course.CourseWareList.AddRange(courseWareList); |
|
|
|
|
|
|
|
|
|
|
|