增加更新角色接口
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
c2166556ea
commit
3ff0230fc1
|
@ -21,7 +21,7 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public Guid IdentityUserId { get; set; }
|
||||
|
||||
public string UserType { get; set; }
|
||||
public string UserType { get; set; }
|
||||
|
||||
public string Phone { get; set; } = String.Empty;
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
@ -41,19 +42,26 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserRealName), t => (t.IdentityUser.FullName).Contains(inQuery.UserRealName))
|
||||
.Select(t => new TrialIdentityUserDto()
|
||||
{
|
||||
Id=t.Id,
|
||||
TrialId=t.TrialId,
|
||||
IsDeleted=t.IsDeleted,
|
||||
CreateTime=t.CreateTime,
|
||||
EMail=t.IdentityUser.EMail,
|
||||
FullName=t.IdentityUser.FullName,
|
||||
IdentityUserId=t.IdentityUserId,
|
||||
JoinTime=t.JoinTime,
|
||||
OrganizationName=t.IdentityUser.OrganizationName,
|
||||
Phone=t.IdentityUser.Phone,
|
||||
UpdateTime=t.UpdateTime,
|
||||
UserName=t.IdentityUser.UserName,
|
||||
RemoveTime=t.RemoveTime
|
||||
Id = t.Id,
|
||||
TrialId = t.TrialId,
|
||||
IsDeleted = t.IsDeleted,
|
||||
CreateTime = t.CreateTime,
|
||||
EMail = t.IdentityUser.EMail,
|
||||
FullName = t.IdentityUser.FullName,
|
||||
IdentityUserId = t.IdentityUserId,
|
||||
JoinTime = t.JoinTime,
|
||||
OrganizationName = t.IdentityUser.OrganizationName,
|
||||
Phone = t.IdentityUser.Phone,
|
||||
UpdateTime = t.UpdateTime,
|
||||
UserName = t.IdentityUser.UserName,
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue