Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
This commit is contained in:
@@ -744,6 +744,8 @@ namespace IRaCIS.Application.Contracts
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
public string CriterionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
/// </summary>
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
if (addOrEditTrialSiteUserSurvey.IsGenerateAccount )
|
||||
{
|
||||
var trialId= _trialSiteUserSurveyRepository.Where(t=>t.Id == addOrEditTrialSiteUserSurvey.TrialSiteSurveyId).Select(t=>t.TrialSiteSurvey.TrialId).FirstOrDefault();
|
||||
var trialId= _trialSiteUserSurveyRepository.Where(t=>t.TrialSiteSurveyId == addOrEditTrialSiteUserSurvey.TrialSiteSurveyId).Select(t=>t.TrialSiteSurvey.TrialId).FirstOrDefault();
|
||||
|
||||
var trialType = _repository.Where<Trial>(t => t.Id == trialId).Select(t => t.TrialType).FirstOrDefault();
|
||||
|
||||
|
||||
@@ -28,16 +28,16 @@ namespace IRaCIS.Core.Application.MediatR.Handlers
|
||||
}
|
||||
|
||||
|
||||
public Task<bool> Handle(TrialStateCacheRequest request, CancellationToken cancellationToken)
|
||||
public async Task<bool> Handle(TrialStateCacheRequest request, CancellationToken cancellationToken)
|
||||
{
|
||||
//项目启动,将项目状态缓存,因为hangfire 加入后台任务,还是向队列添加任务,执行都有延迟,效果不好
|
||||
var list = _trialRepository.Select(t => new { TrialId = t.Id, TrialStatusStr = t.TrialStatusStr }).ToList();
|
||||
var list = await _trialRepository.Select(t => new { TrialId = t.Id, TrialStatusStr = t.TrialStatusStr }).ToListAsync();
|
||||
|
||||
// 每天都会有任务刷新状态,项目编辑 添加时 都会处理到缓存中
|
||||
list.ForEach(t => _provider.Set(t.TrialId.ToString(), t.TrialStatusStr, TimeSpan.FromDays(7)));
|
||||
|
||||
|
||||
return Task.FromResult(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user