修改参与用户的JoinTime

Test.EIImageViewer
{872297557@qq.com} 2022-11-30 15:23:19 +08:00
parent 6ec64c9744
commit 91227c1a67
5 changed files with 8 additions and 6 deletions

View File

@ -187,7 +187,6 @@ namespace IRaCIS.Core.API.Controllers
section = await reader.ReadNextSectionAsync();
}
//return fileCount;
}

View File

@ -5,6 +5,7 @@ using MassTransit;
using IRaCIS.Core.Infrastructure;
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Application.Filter;
namespace IRaCIS.Core.Application.Service
{
@ -222,6 +223,7 @@ namespace IRaCIS.Core.Application.Service
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
[TypeFilter(typeof(TrialResourceFilter))]
public async Task<IResponseOutput> AddOrUpdateReadingMedicineTrialQuestion(ReadingMedicineTrialQuestionAddOrEdit inDto)
{
var existsQuery = _readingMedicineTrialQuestionRepository
@ -245,6 +247,7 @@ namespace IRaCIS.Core.Application.Service
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
[TypeFilter(typeof(TrialResourceFilter))]
public async Task<IResponseOutput> DeleteReadingMedicineTrialQuestion(DeleteReadingMedicineTrialQuestion inDto)
{
if (await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.ParentId == inDto.Id))

View File

@ -216,7 +216,7 @@ namespace IRaCIS.Core.Application.Service
if (!await _trialUserRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == userId, true))
{
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId });
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId ,JoinTime = DateTime.Now });
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
@ -698,7 +698,7 @@ namespace IRaCIS.Core.Application.Service
//判断TrialUser中是否存在 不存在就插入
if (!await _repository.AnyAsync<TrialUser>(t => t.TrialId == trialId && t.UserId == externalUser.SystemUserId))
{
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = (Guid)externalUser.SystemUserId });
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = (Guid)externalUser.SystemUserId, JoinTime = DateTime.Now });
await _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialExternalUserId,
u => new TrialExternalUser() { InviteState = TrialExternalUserStateEnum.UserConfirmed });

View File

@ -387,7 +387,7 @@ namespace IRaCIS.Application.Services
if( !await _trialUserRepository.AnyAsync(t=>t.TrialId==trialId && t.UserId== userId, true))
{
await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId });
await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId ,JoinTime = DateTime.Now });
}
await _enrollRepository.BatchUpdateNoTrackingAsync(t => t.Id == intoGroupItem.Id, u => new Enroll() { DoctorUserId = userId });