Commit f2e16a05 authored by 黄奎's avatar 黄奎

页面修改

parent d6892e63
......@@ -2122,43 +2122,5 @@ namespace Edu.Module.Course
}
#endregion
#region 甲鹤同业小程序
/// <summary>
/// 小程序获取分类鹤课程列表
/// </summary>
/// <returns></returns>
public object App_GetCateAndCourseListModule(int Group_Id)
{
var data= GetCourseListModule(new RB_Course_ViewModel() { Group_Id= Group_Id });
List<object> courseSubjects = new List<object>();
List<object> cateResultList = new List<object>();
if (data != null && data.Count > 0)
{
foreach (var item in data.GroupBy(qitem => qitem.CourseSubject)?.ToList())
{
courseSubjects.Add(new
{
SubjectKey= item.Key,
SubjectName= item.Key.ToName()
});
}
var cateList = data.GroupBy(qitem => new { qitem.CateId, qitem.CateName }).Select(qitem => new { qitem.Key.CateId, qitem.Key.CateName });
foreach (var item in cateList)
{
cateResultList.Add(new
{
item.CateId,
item.CateName,
CourseList = data.Where(qitem => qitem.CateId == item.CateId)?.ToList()
});
}
}
return new { courseSubjects , cateList= cateResultList };
}
#endregion
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment