From a4738c3c7a5dc073c2a79c0f88bdea05651f7ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=93=E5=A4=A7=E5=B8=88?= <156663459@qq.com> Date: Sat, 30 Jan 2021 19:49:54 +0800 Subject: [PATCH] =?UTF-8?q?---=E8=AF=86=E5=88=AB=E9=87=8E=E9=B8=A1?= =?UTF-8?q?=E5=A4=A7=E5=AD=A6--?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- New_College.Api/New_College.Model.xml | 10 ++++++++++ .../ViewModels/Result/UniversityCollectionResult.cs | 10 ++++++++++ New_College.Services/D_UniversityCollectionServices.cs | 6 ++++-- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/New_College.Api/New_College.Model.xml b/New_College.Api/New_College.Model.xml index aad1ca0..db410fb 100644 --- a/New_College.Api/New_College.Model.xml +++ b/New_College.Api/New_College.Model.xml @@ -4539,6 +4539,16 @@ 是否收藏 + + + 省市区名称 + + + + + 学科层次 + + 名称 diff --git a/New_College.Model/ViewModels/Result/UniversityCollectionResult.cs b/New_College.Model/ViewModels/Result/UniversityCollectionResult.cs index b328f33..b2cbb7a 100644 --- a/New_College.Model/ViewModels/Result/UniversityCollectionResult.cs +++ b/New_College.Model/ViewModels/Result/UniversityCollectionResult.cs @@ -44,6 +44,16 @@ namespace New_College.Model.ViewModels /// 是否收藏 /// public bool IsCollection { get; set; } + + /// + /// 省市区名称 + /// + public string AreaName { get; set; } + + /// + /// 学科层次 + /// + public int SubjectLevel { get; set; } } diff --git a/New_College.Services/D_UniversityCollectionServices.cs b/New_College.Services/D_UniversityCollectionServices.cs index 43873e8..646498e 100644 --- a/New_College.Services/D_UniversityCollectionServices.cs +++ b/New_College.Services/D_UniversityCollectionServices.cs @@ -69,7 +69,9 @@ namespace New_College.Services //Tags = attribute, Name = nowinfo.Name, IsContrast = HaveContrast.Count(x => x.UniversityId == item.UniversityId) > 0, - IsCollection = true + IsCollection = true, + AreaName = nowinfo.Area_Name, + SubjectLevel = nowinfo.Subject_Level }); } return new MessageModel>() @@ -195,7 +197,7 @@ namespace New_College.Services if (info.Count <= 0) return new MessageModel>() { success = false, msg = "暂未收藏学校" }; var universityids = info.Select(x => x.UniversityId).ToList(); - var universityinfo = await d_UniversityRepository.Query(x => universityids.Contains(x.Id) && x.IsDelete == false,"Rank Asc"); + var universityinfo = await d_UniversityRepository.Query(x => universityids.Contains(x.Id) && x.IsDelete == false, "Rank Asc"); if (universityinfo.Count <= 0) return new MessageModel>() { success = false, msg = "学校数据为空" }; var arealist = universityinfo.Select(x => x.Area_Name).Distinct().ToList();