Commit 9f4200ee authored by 黄奎's avatar 黄奎

页面修改

parent 2c817811
......@@ -89,7 +89,7 @@ WHERE 1=1
List<RB_Course_CommentDetails_Extend> detailsList = courseCommentDetailsRepository.GetCourseCommentDetailsListRepository(new RB_Course_CommentDetails_Extend() { QCourseCommentIds = Ids });
foreach (var item in list)
{
item.CommentDetails = detailsList?.Where(qitem => qitem.CourseCommentId == item.Id)?.ToList() ?? new List<RB_Course_CommentDetails_Extend>();
item.CommentDetails = detailsList?.Where(qitem => qitem.CourseCommentId == item.Id)?.OrderBy(qitem=>qitem.StartNum)?.ToList() ?? new List<RB_Course_CommentDetails_Extend>();
}
}
return list;
......
......@@ -161,7 +161,15 @@ WHERE 1=1
{
if (defaultComment != null && defaultComment.Details != null && defaultComment.Details.Count > 0)
{
var tempModel = defaultComment.Details.Where(qitem => qitem.StartNum <= Score && Score < qitem.EndNum)?.FirstOrDefault();
var tempModel = new RB_Comment_Details();
if (Score == 100)
{
tempModel = defaultComment.Details.Where(qitem => Score == qitem.EndNum)?.FirstOrDefault();
}
else
{
tempModel = defaultComment.Details.Where(qitem => qitem.StartNum <= Score && Score < qitem.EndNum)?.FirstOrDefault();
}
if (tempModel != null)
{
info = tempModel?.Info ?? "";
......@@ -172,7 +180,15 @@ WHERE 1=1
{
if (courseComment != null && courseComment.CommentDetails != null && courseComment.CommentDetails.Count > 0)
{
var tempModel = courseComment.CommentDetails.Where(qitem => qitem.StartNum <= Score && Score < qitem.EndNum)?.FirstOrDefault();
var tempModel = new RB_Course_CommentDetails_Extend();
if (Score == 100)
{
tempModel = courseComment.CommentDetails.Where(qitem => Score == qitem.EndNum)?.FirstOrDefault();
}
else
{
tempModel = courseComment.CommentDetails.Where(qitem => qitem.StartNum <= Score && Score < qitem.EndNum)?.FirstOrDefault();
}
if (tempModel != null)
{
info = tempModel?.Info ?? "";
......
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