授权修改
parent
dfe6d13182
commit
3ccb3ff4de
|
@ -21,6 +21,12 @@ public class TrialFinalRecordView : TrialFinalRecordAddOrEdit
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class AuthorizedTrialFinalRecordInDto
|
||||||
|
{
|
||||||
|
public List<Guid> Ids { get; set; }
|
||||||
|
|
||||||
|
public bool IsAuthorizedView { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class TrialFinalRecordAddOrEdit
|
public class TrialFinalRecordAddOrEdit
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,6 +64,18 @@ public class TrialFinalRecordService(IRepository<TrialFinalRecord> _trialFinalRe
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 授权文档
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<IResponseOutput> AuthorizedTrialFinalRecord(AuthorizedTrialFinalRecordInDto inDto)
|
||||||
|
{
|
||||||
|
await _trialFinalRecordRepository.UpdatePartialFromQueryAsync(t =>inDto.Ids.Contains(t.Id), t => new TrialFinalRecord() { IsAuthorizedView = inDto.IsAuthorizedView });
|
||||||
|
await _trialFinalRecordRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[HttpDelete("{trialFinalRecordId:guid}")]
|
[HttpDelete("{trialFinalRecordId:guid}")]
|
||||||
public async Task<IResponseOutput> DeleteTrialFinalRecord(Guid trialFinalRecordId)
|
public async Task<IResponseOutput> DeleteTrialFinalRecord(Guid trialFinalRecordId)
|
||||||
|
|
Loading…
Reference in New Issue