@@ -750,6 +750,15 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class SetTrialLinkExpirationTimeDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public DateTime? LinkExpirationTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class GetTrialReadingCriterionInfoOutDto
|
||||
{
|
||||
|
||||
|
||||
@@ -78,6 +78,43 @@ namespace IRaCIS.Core.Application
|
||||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置项目链接过期时间
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetTrialLinkExpirationTime(SetTrialLinkExpirationTimeDto inDto)
|
||||
{
|
||||
await _trialRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.TrialId, x => new Trial()
|
||||
{
|
||||
LinkExpirationTime = inDto.LinkExpirationTime
|
||||
});
|
||||
|
||||
await _trialRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目链接过期时间
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<SetTrialLinkExpirationTimeDto> GetTrialLinkExpirationTime(SetTrialLinkExpirationTimeDto inDto)
|
||||
{
|
||||
var result = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => new SetTrialLinkExpirationTimeDto()
|
||||
{
|
||||
TrialId = x.Id,
|
||||
LinkExpirationTime = x.LinkExpirationTime
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目已经确认的标准
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user