休息时间修改
continuous-integration/drone/push Build is passing Details

IRC_NewDev
he 2024-01-09 13:58:52 +08:00
parent beb43a785e
commit 3768c22aed
1 changed files with 3 additions and 3 deletions

View File

@ -2585,13 +2585,13 @@ namespace IRaCIS.Application.Services
#region 两小时 #region 两小时
var cacheDate = DateTime.Parse(value.ToString()); var cacheDate = DateTime.Parse(value.ToString());
int timespanMin = (DateTime.Now - cacheDate).Minutes; int timespanMin = (DateTime.Now - cacheDate).Minutes;
if (timespanMin > 120 && timespanMin < 140) if (timespanMin > 120 && timespanMin < 130)
{ {
throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", 2, 20]); throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", 2, 20]);
} }
else if (timespanMin > 140) else if (timespanMin > 130)
{ {
cacheDate = cacheDate.AddMinutes((Math.Floor((double)(timespanMin / 140))) * 140); cacheDate = cacheDate.AddMinutes((Math.Floor((double)(timespanMin / 130))) * 130);
_provider.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5)); _provider.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5));
// _cache.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5)); // _cache.Set(cacheKey, cacheDate.ToString(), TimeSpan.FromHours(5));