规则通过id查询
parent
ffe0d0daf6
commit
e17c2d0b4a
|
@ -31,12 +31,10 @@ public class TypeServiceImpl implements TypeService {
|
|||
@Override
|
||||
public Result add(EngineType type) {
|
||||
if (StringUtils.isEmpty(type.getName())){
|
||||
return Result.error("类型不能为空");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(type.getName())){
|
||||
if (list().contains(type)){
|
||||
return Result.error("该类型已存在");
|
||||
return Result.error("类型名称不能为空");
|
||||
}
|
||||
if (type.getName().equals(type.getName())){
|
||||
return Result.error("类型名称不能重复");
|
||||
}
|
||||
Integer res = typseMapper.add(type);
|
||||
return Result.success(res);
|
||||
|
|
Loading…
Reference in New Issue