diff --git a/New_College.Api/Controllers/Front/LibraryController.cs b/New_College.Api/Controllers/Front/LibraryController.cs index 297d37e..b621b6b 100644 --- a/New_College.Api/Controllers/Front/LibraryController.cs +++ b/New_College.Api/Controllers/Front/LibraryController.cs @@ -55,6 +55,16 @@ namespace New_College.Api.Controllers.Front var biaozhun = await _ScoreLineServices.Query(c => (c.Score == queryDto.Score.ToString() || c.Score == (queryDto.Score - 1).ToString()) && c.Province == queryDto.Pronvice && c.Years == queryDto.Years); var lines = biaozhun.Select(s => s.SumCount).ToArray(); + if (biaozhun.Count() <= 0) + { + + return new MessageModel>() + { + success = false, + msg = "暂无数据", + status = 200 + }; + } var query = await _ScoreLineServices.Query(c => SqlFunc.Between(c.SumCount, lines.Min(), lines.Max()) && c.Province == queryDto.Pronvice); //var newscore = queryDto.Score - 1; //var tmpquery = await _ScoreLineServices.Query(c => c.Score == newscore.ToString() && c.Province == queryDto.Pronvice);