休息时间修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
beb43a785e
commit
3768c22aed
|
@ -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));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue