增加更新角色接口
continuous-integration/drone/push Build is passing Details

Uat_IRC_Net8
hang 2024-12-25 14:02:17 +08:00
parent c2166556ea
commit 3ff0230fc1
2 changed files with 40 additions and 17 deletions

View File

@ -180,8 +180,8 @@ namespace IRaCIS.Application.Contracts
[ExcelFormat("yyyy-MM-dd")]
public DateTime? JoinTime { get; set; }
public string JoinTimeStr => JoinTime?.ToString("yyyy-MM-dd") ?? string.Empty;
public string RemoveTimeStr => RemoveTime?.ToString("yyyy-MM-dd") ?? string.Empty;
//public string JoinTimeStr => JoinTime?.ToString("yyyy-MM-dd") ?? string.Empty;
//public string RemoveTimeStr => RemoveTime?.ToString("yyyy-MM-dd") ?? string.Empty;
public List<TrialIdentityUserRoleDto> TrialUserRoleList { get; set; }
@ -518,6 +518,12 @@ namespace IRaCIS.Application.Contracts
}
public class UpdateTrialUserRoleCommand
{
public List<Guid> IdList { get; set; }
public bool IsDeleted { get; set; }
}
public class UpdateTrialUserCommand
{

View File

@ -1,4 +1,5 @@
using IRaCIS.Application.Contracts;
using FellowOakDicom;
using IRaCIS.Application.Contracts;
using IRaCIS.Application.Interfaces;
using IRaCIS.Core.Application.Contracts.DTO;
using IRaCIS.Core.Application.Filter;
@ -53,7 +54,14 @@ namespace IRaCIS.Core.Application.Service
Phone = t.IdentityUser.Phone,
UpdateTime = t.UpdateTime,
UserName = t.IdentityUser.UserName,
RemoveTime=t.RemoveTime
RemoveTime = t.RemoveTime,
TrialUserRoleList = t.TrialUserRoleList.Select(ur => new TrialIdentityUserRoleDto()
{
Id = ur.Id,
IsDeleted = ur.IsDeleted,
CreateTime = ur.CreateTime,
UpdateTime = ur.UpdateTime
}).ToList()
});
return await query.ToPagedListAsync(inQuery, nameof(TrialIdentityUserDto.UpdateTime));
@ -96,6 +104,15 @@ namespace IRaCIS.Core.Application.Service
}
[HttpPut]
public async Task<IResponseOutput> UpdateTrialUserRole(UpdateTrialUserRoleCommand updateCommand)
{
await _trialUseRoleRepository.UpdatePartialFromQueryAsync(t => updateCommand.IdList.Contains(t.Id), u => new TrialUserRole() { IsDeleted = updateCommand.IsDeleted }, true);
return ResponseOutput.Ok();
}
/// <summary> Setting页面 项目参与人员勾选列表 </summary>
[HttpPost]
public async Task<PageOutput<TrialUserRoleScreeningDto>> GetTrialUserScreeningList(TrialUserQuery inQuery)