@@ -69,6 +69,13 @@ public class SegmentBindingAddOrEdit
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class LockOrUnLockSegmentInDto
|
||||
{
|
||||
public Guid SegmentId { get; set; }
|
||||
|
||||
public bool IsLock { get; set; }
|
||||
}
|
||||
public class SegmentBindingQuery:PageInput
|
||||
{
|
||||
public Guid? QuestionId { get; set; }
|
||||
|
||||
@@ -165,6 +165,21 @@ public class SegmentationService(IRepository<Segmentation> _segmentationReposito
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 锁定解锁分割
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> LockOrUnLockSegment(LockOrUnLockSegmentInDto inDto)
|
||||
{
|
||||
await _segmentRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.SegmentId, t => new Segment
|
||||
{
|
||||
IsLock = inDto.IsLock
|
||||
});
|
||||
await _segmentRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取分割绑定
|
||||
|
||||
Reference in New Issue
Block a user