Uat_Study
parent
7b272a0b21
commit
3626d2e1bf
|
@ -128,6 +128,7 @@
|
|||
//UserWLTemplateService
|
||||
"UserWLTS_MaxTemplate": "The same user can add a maximum of 10 templates.",
|
||||
"UserWLTS_NameRepeated": "The template name is repeated",
|
||||
"UserWLTS_ContentRepeated": "The template content is repeated",
|
||||
|
||||
// ------------------------------------------------------------Allocation--------------------------------------------------------------------
|
||||
//TaskAllocationRuleService
|
||||
|
|
|
@ -128,6 +128,7 @@
|
|||
//UserWLTemplateService
|
||||
"UserWLTS_MaxTemplate": "同一个用户最多只能添加10个模板",
|
||||
"UserWLTS_NameRepeated": "模板名称存在重复",
|
||||
"UserWLTS_ContentRepeated": "模板内容存在重复",
|
||||
|
||||
// ------------------------------------------------------------Allocation--------------------------------------------------------------------
|
||||
//TaskAllocationRuleService
|
||||
|
|
|
@ -66,7 +66,10 @@ 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());
|
||||
|
|
Loading…
Reference in New Issue