This commit is contained in:
tanglong 2026-03-31 09:40:08 +08:00
parent c14d44b532
commit f4a61ff17e

View File

@ -531,19 +531,22 @@ namespace VOL.Business.Services
var today = DateTime.Today; var today = DateTime.Today;
// 先确定当前学期的时间范围 // 先确定当前学期的时间范围
DateTime startDate, endDate; //DateTime startDate, endDate;
// 规则:上学期 9月1日 – 次年2月1日;下学期 2月1日 – 9月1日 //// 规则:上学期 9月1日 – 次年2月1日;下学期 2月1日 – 9月1日
if (today.Month >= 9 || today.Month < 2) // 上学期 //if (today.Month >= 9 || today.Month < 2) // 上学期
{ //{
startDate = new DateTime(today.Month >= 9 ? today.Year : today.Year - 1, 1, 1); // startDate = new DateTime(today.Month >= 9 ? today.Year : today.Year - 1, 1, 1);
endDate = new DateTime(today.Month >= 9 ? today.Year + 1 : today.Year, 2, 1); // endDate = new DateTime(today.Month >= 9 ? today.Year + 1 : today.Year, 2, 1);
} //}
else // 下学期 //else // 下学期
{ //{
startDate = new DateTime(today.Year, 2, 1); // startDate = new DateTime(today.Year, 2, 1);
endDate = new DateTime(today.Year, 10, 1); // endDate = new DateTime(today.Year, 10, 1);
} //}
DateTime startDate = new DateTime(2025, 1, 1);
DateTime endDate = DateTime.Now;
var SmartPlaygroundKey = $"SmartPlayground_{tenantId}"; var SmartPlaygroundKey = $"SmartPlayground_{tenantId}";