添加中心调研链接过期时间
continuous-integration/drone/push Build is running

This commit is contained in:
he
2026-06-16 15:42:33 +08:00
parent d33b84c245
commit ddd06c8313
7 changed files with 22471 additions and 4 deletions
@@ -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>