Commit 3af946ee authored by 黄奎's avatar 黄奎

页面修改

parent 5861f857
......@@ -33,5 +33,10 @@ namespace Edu.Model.ViewModel.Course
/// 分类名称
/// </summary>
public string CateName { get; set; }
/// <summary>
/// 分类编号【查询使用】
/// </summary>
public string QCateIds { get; set; }
}
}
\ No newline at end of file
......@@ -57,6 +57,11 @@ namespace Edu.Module.Course
/// </summary>
private readonly RB_Course_JobRepository courseJobRepository = new RB_Course_JobRepository();
/// <summary>
/// 课程分类处理类
/// </summary>
private readonly CourseCategoryModule courseCategoryModule = new CourseCategoryModule();
#region 课程管理
/// <summary>
......@@ -79,6 +84,14 @@ namespace Edu.Module.Course
/// <returns></returns>
public List<RB_Course_ViewModel> GetCoursePageListModule(int pageIndex, int pageSize, out long rowsCount, RB_Course_ViewModel query)
{
if (!string.IsNullOrWhiteSpace(query.QCateIds) && query.QCateIds != "0")
{
string cateIds = courseCategoryModule.GetChildCategoryStringModule(query.QCateIds);
if (!string.IsNullOrWhiteSpace(cateIds))
{
query.QCateIds = cateIds;
}
}
return courseRepository.GetCoursePageListRepository(pageIndex, pageSize, out rowsCount, query);
}
......
......@@ -79,6 +79,10 @@ WHERE 1=1
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_ViewModel.CateId), query.CateId);
}
if (!string.IsNullOrWhiteSpace(query.QCateIds))
{
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Course_ViewModel.CateId), query.QCateIds);
}
}
return GetPage<RB_Course_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
......
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