This commit is contained in:
he
2023-06-02 14:22:44 +08:00
parent 7b272a0b21
commit 3626d2e1bf
3 changed files with 6 additions and 1 deletions
@@ -65,8 +65,11 @@ namespace IRaCIS.Core.Application.Service
{
throw new BusinessValidationFailedException(_localizer["UserWLTS_NameRepeated"]);
}
if (await _userWLTemplateRepository.AnyAsync(x => x.UserId == _userInfo.Id && x.WW == addOrEditUserWLTemplate.WW && x.WL == addOrEditUserWLTemplate.WL && x.Id != addOrEditUserWLTemplate.Id))
{
throw new BusinessValidationFailedException(_localizer["UserWLTS_ContentRepeated"]);
}
var entity = await _userWLTemplateRepository.InsertOrUpdateAsync(addOrEditUserWLTemplate, true);
return ResponseOutput.Ok(entity.Id.ToString());