|
|
|
@ -59,7 +59,10 @@ public class DataLabelsServiceImpl extends BaseServiceImpl<DataLabelsMapper, Dat |
|
|
|
|
entity.setIdPath("/"); |
|
|
|
|
entity.setTitlePath("/"); |
|
|
|
|
} |
|
|
|
|
Assert.isNull(getByTitlePathAndTitle(entity), "分类下存在相同名称,请检查"); |
|
|
|
|
DataLabelsVo old = getById(entity.getId()); |
|
|
|
|
if(old == null || !old.getTitle().equals(entity.getTitle())){ |
|
|
|
|
Assert.isNull(getByTitlePathAndTitle(entity), "分类下存在相同名称,请检查"); |
|
|
|
|
} |
|
|
|
|
return super.updateOrSave(entity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|