加返回参数

IRC_NewDev
he 2024-07-16 09:57:33 +08:00
parent 0e0dd0c7d3
commit 49e21a6342
1 changed files with 7 additions and 2 deletions

View File

@ -22,6 +22,8 @@ using AutoMapper.QueryableExtensions;
using IRaCIS.Application.Contracts; using IRaCIS.Application.Contracts;
using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Models;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using System.Linq;
using NPOI.SS.Formula.Functions;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory; using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
namespace IRaCIS.Application.Services namespace IRaCIS.Application.Services
@ -3001,7 +3003,7 @@ namespace IRaCIS.Application.Services
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task VerifyReadingRestTime() public async Task<bool> VerifyReadingRestTime()
{ {
var userTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt; var userTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt;
if (userTypeEnum != UserTypeEnum.IndependentReviewer) if (userTypeEnum != UserTypeEnum.IndependentReviewer)
@ -3051,6 +3053,8 @@ namespace IRaCIS.Application.Services
#endregion #endregion
} }
return true;
} }
/// <summary> /// <summary>
@ -3058,7 +3062,7 @@ namespace IRaCIS.Application.Services
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task ResetReadingRestTime(Guid? userID) public async Task<bool> ResetReadingRestTime(Guid? userID)
{ {
if (userID == null) if (userID == null)
{ {
@ -3085,6 +3089,7 @@ namespace IRaCIS.Application.Services
{ {
_provider.Set(startReadingTimeKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48)); _provider.Set(startReadingTimeKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
} }
return true;
} }
/// <summary> /// <summary>