修改一版

This commit is contained in:
he
2022-08-04 16:17:10 +08:00
parent 43c770921c
commit c1e4ec0b5e
@@ -103,6 +103,12 @@ namespace IRaCIS.Core.Application.Contracts
public async Task<IResponseOutput> AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure)
{
if (await _qcQuestionRepository.AnyAsync(x => x.Id != addOrEditQCQuestionConfigure.Id && x.ShowOrder == addOrEditQCQuestionConfigure.ShowOrder))
{
throw new BusinessValidationFailedException("序号重复,操作失败");
}
var entity = await _qcQuestionRepository.InsertOrUpdateAsync(addOrEditQCQuestionConfigure, true);
return ResponseOutput.Ok(entity.Id.ToString());
}