额
This commit is contained in:
parent
adb7a5132b
commit
b435e5157d
@ -130,16 +130,21 @@ namespace YD_AllHeartRates.Api.Services.Impl
|
||||
|
||||
var classList = await (
|
||||
from c in _sportsContext.Class
|
||||
join s in _sportsContext.ClassAssocTeacher on c.Id equals s.ClassId
|
||||
join t in _sportsContext.Teacher on s.TeacherId equals t.Id
|
||||
join s in _sportsContext.ClassAssocTeacher on c.Id equals s.ClassId into classAssoc
|
||||
from s in classAssoc.DefaultIfEmpty()
|
||||
join t in _sportsContext.Teacher on s.TeacherId equals t.Id into teacherInfo
|
||||
from t in teacherInfo.DefaultIfEmpty()
|
||||
where c.SchoolCode == schoolCode && c.GradeId == gradeId
|
||||
select new ClassListDto
|
||||
{
|
||||
ClassId = c.Id,
|
||||
ClassName = c.ClassName,
|
||||
GradeName = c.GradeName,
|
||||
TeacherName = t.TeacherName
|
||||
}).OrderBy(x => x.ClassId).ToListAsync();
|
||||
TeacherName = t != null ? t.TeacherName : null
|
||||
})
|
||||
.OrderBy(x => x.ClassId)
|
||||
.ToListAsync();
|
||||
|
||||
|
||||
var studentList = await (
|
||||
from s in _sportsContext.Student
|
||||
|
@ -137,7 +137,8 @@ namespace YD_AllHeartRates.Api.Services.Impl
|
||||
StudentName = x.StudentName,
|
||||
Sex = x.Sex,
|
||||
Photo = x.Photo ?? ""
|
||||
}).ToListAsync();
|
||||
})
|
||||
.ToListAsync();
|
||||
|
||||
_caching.AddObject(studentListKey, studentList, 60); // 缓存 8 小时
|
||||
}
|
||||
|
@ -313,13 +313,13 @@ namespace YD_AllHeartRates.Api
|
||||
app.UseStaticHttpContext();
|
||||
app.UseMiddleware<JwtContextMiddleware>();
|
||||
|
||||
//app.UseSwagger();
|
||||
//app.UseSwaggerUI(c =>
|
||||
//{
|
||||
// //2个下拉框选项 选择对应的文档
|
||||
// c.SwaggerEndpoint("/swagger/v1/swagger.json", "YD_AllHeartRates.Api");
|
||||
// c.RoutePrefix = "";
|
||||
//});
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
//2个下拉框选项 选择对应的文档
|
||||
c.SwaggerEndpoint("/swagger/v1/swagger.json", "YD_AllHeartRates.Api");
|
||||
c.RoutePrefix = "";
|
||||
});
|
||||
|
||||
app.UseRouting();
|
||||
app.UseCors();
|
||||
|
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+49a6cb3a6dd561806da8e0157c7126774e0cfda0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+adb7a5132ba408ee1c99d16fb2ead9bed7a7ccc5")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Api")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
5e1ce581baeb690fbd907058052a9f7fd6d22c49d7e036c5953449b221cb4b54
|
||||
6198966bba43cd9c423a58fba5f3c39b124d08b73c11ccc008ce22ad17ebb10f
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Commons")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7b9f68a3083ca4505691f4f83599da73c25dca89")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+adb7a5132ba408ee1c99d16fb2ead9bed7a7ccc5")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Commons")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Commons")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
a15d75618d9a5f604592ebd59e64d2979ec0365ce6479e8233cedcc51f5c89ef
|
||||
39e19d927f4b3fa147400b1bba96cb47a1b0af113b4d9bd138d8a25b4ed27817
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user