feat:bug 修复

develop
old易 2024-03-11 15:45:42 +08:00
parent 05bc0ce8c4
commit ec4fad2773
3 changed files with 4 additions and 3 deletions

View File

@ -241,7 +241,7 @@ namespace New_College.Api.Controllers
UId = request.Uid, UId = request.Uid,
LowScore = c.LowScore, LowScore = c.LowScore,
LowScoreRank = c.LowScoreRank, LowScoreRank = c.LowScoreRank,
AvgScore = c.AvgScore, AvgScore = c.AvgScore != "-" ? int.Parse(c.AvgScore) <= c.LowScore ? "-" : c.AvgScore : "-",
Years = c.Years, Years = c.Years,
FirstType = c.FirstType, FirstType = c.FirstType,
HighScore = c.HighScore, HighScore = c.HighScore,

View File

@ -108,7 +108,8 @@ namespace New_College.Api.Controllers.Front
CreateTime = s.CreateTime.Value, CreateTime = s.CreateTime.Value,
Id = s.Id, Id = s.Id,
Summary = !string.IsNullOrWhiteSpace(s.Summary) ? s.Summary : s.Detail.Substring(0, 200) + "...", Summary = !string.IsNullOrWhiteSpace(s.Summary) ? s.Summary : s.Detail.Substring(0, 200) + "...",
Title = s.Title Title = s.Title,
Source = s.Author
}).ToList(); }).ToList();
pageresponse.pageCount = pageinfo.data.Count; pageresponse.pageCount = pageinfo.data.Count;
pageresponse.page = pageinfo.data.Count; pageresponse.page = pageinfo.data.Count;

View File

@ -290,7 +290,7 @@ namespace New_College.Repository
}); });
return new PageModel<UniversityResult>() return new PageModel<UniversityResult>()
{ {
data = recommendInfo, data = recommendInfo.OrderBy(o => o.Percentage).ToList(),
page = query.PageIndex, page = query.PageIndex,
PageSize = query.PageSize, PageSize = query.PageSize,
dataCount = totalNumber, dataCount = totalNumber,