...
|
...
|
@@ -35,7 +35,7 @@ func (rs *EvaluationRuleService) Create(in *command.CreateRuleCommand) (interfac |
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if count > 0 {
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, "名称已存在")
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, "已存在相同名称的评估规则")
|
|
|
}
|
|
|
|
|
|
if in.Type == domain.EvaluationTypeRating { // 按等级量化值排序
|
...
|
...
|
@@ -82,7 +82,7 @@ func (rs *EvaluationRuleService) Update(in *command.UpdateRuleCommand) (interfac |
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if count > 0 {
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, "名称已存在")
|
|
|
return nil, application.ThrowError(application.BUSINESS_ERROR, "已存在相同名称的评估规则")
|
|
|
}
|
|
|
|
|
|
rule, err := ruleRepository.FindOne(map[string]interface{}{"id": in.Id})
|
...
|
...
|
|