|
@@ -15,7 +15,6 @@ namespace GxPress.Service.Implement.AppHomePage
|
|
|
/// </summary>
|
|
|
/// <param name="request"></param>
|
|
|
/// <returns></returns>
|
|
|
-
|
|
|
public async Task<NavigationSearchResult> GetNavigationSearchResultAsync(NavigationSearchRequest request)
|
|
|
{
|
|
|
var result = new NavigationSearchResult()
|
|
@@ -24,6 +23,12 @@ namespace GxPress.Service.Implement.AppHomePage
|
|
|
TeacherItems = await GetNavigationSearchResultAysnc(request),
|
|
|
YearItems = await GetNavigationYearResult(request)
|
|
|
};
|
|
|
+ var database = new Database(DatabaseType.MySql, Common.Tools.ConfigHelper.GetValue("Database:ConnectionString"));
|
|
|
+ var connection = database.GetConnection();
|
|
|
+ var maxYearSql = $"select max(AddDate) from tede_media where id in( SELECT MediaId FROM tede_system_lable_media where typevalue=1)";
|
|
|
+ result.EndTime = await connection.ExecuteScalarAsync<string>(maxYearSql);
|
|
|
+ var minYearSql = $"select min(AddDate) from tede_media where id in( SELECT MediaId FROM tede_system_lable_media where typevalue=1)";
|
|
|
+ result.BeginTime = await connection.ExecuteScalarAsync<string>(minYearSql);
|
|
|
return result;
|
|
|
}
|
|
|
|