Commit 73ea477d by hzc

修改目录提示信息“名称重复,请重新输入!”

parent 7f0242f6
......@@ -28,7 +28,7 @@ public class DriveIndCatalogService {
if(driveIndCatalog.getId()==null) {//新增
if(!driveIndCatalogMapper.findIsExist(driveIndCatalog.getCatalogName(),
driveIndCatalog.getParentId(), driveIndCatalog.getCode()).isEmpty()) {
throw new Exception("存在同名目录");
throw new Exception("名称重复,请重新输入!");
}
//保存
driveIndCatalogMapper.insert(driveIndCatalog);
......@@ -36,7 +36,7 @@ public class DriveIndCatalogService {
List<DriveIndCatalog> dbList = driveIndCatalogMapper.findIsExist(driveIndCatalog.getCatalogName(),
driveIndCatalog.getParentId(), driveIndCatalog.getCode());
if(!dbList.isEmpty() && !dbList.get(0).getId().equals(driveIndCatalog.getId())) {
throw new Exception("存在同名目录");
throw new Exception("名称重复,请重新输入!");
}
}
//获取parentId拼接idPath
......
......@@ -28,7 +28,7 @@ public class IndCatalogService {
if(indCatalog.getId()==null) {//新增
if(!indCatalogMapper.findIsExist(indCatalog.getCatalogName(), indCatalog.getParentId(),
indCatalog.getCode()).isEmpty()) {
throw new Exception("存在同名目录");
throw new Exception("名称重复,请重新输入!");
}
//保存
indCatalogMapper.insert(indCatalog);
......@@ -36,7 +36,7 @@ public class IndCatalogService {
List<IndCatalog> dbList = indCatalogMapper.findIsExist(indCatalog.getCatalogName(), indCatalog.getParentId(),
indCatalog.getCode());
if(!dbList.isEmpty() && !dbList.get(0).getId().equals(indCatalog.getId())) {
throw new Exception("存在同名目录");
throw new Exception("名称重复,请重新输入!");
}
}
//获取parentId拼接idPath
......
......@@ -27,7 +27,7 @@ public class ScoreRuleCatalogService {
if(scoreRuleCatalog.getId()==null) {//新增
if(!scoreRuleCatalogMapper.findIsExist(scoreRuleCatalog.getCatalogName(),
scoreRuleCatalog.getParentId(), scoreRuleCatalog.getCode()).isEmpty()) {
throw new Exception("存在同名目录");
throw new Exception("名称重复,请重新输入!");
}
//保存
scoreRuleCatalogMapper.insert(scoreRuleCatalog);
......@@ -35,7 +35,7 @@ public class ScoreRuleCatalogService {
List<ScoreRuleCatalog> dbList = scoreRuleCatalogMapper.findIsExist(scoreRuleCatalog.getCatalogName(),
scoreRuleCatalog.getParentId(), scoreRuleCatalog.getCode());
if(!dbList.isEmpty() && !dbList.get(0).getId().equals(scoreRuleCatalog.getId())) {
throw new Exception("存在同名目录");
throw new Exception("名称重复,请重新输入!");
}
}
//获取parentId拼接idPath
......
......@@ -27,7 +27,7 @@ public class ScorecardCatalogService {
if(scorecardCatalog.getId()==null) {//新增
if(!scorecardCatalogMapper.findIsExist(scorecardCatalog.getCatalogName(),
scorecardCatalog.getParentId(), scorecardCatalog.getCode()).isEmpty()) {
throw new Exception("存在同名目录");
throw new Exception("名称重复,请重新输入!");
}
//保存
scorecardCatalogMapper.insert(scorecardCatalog);
......@@ -35,7 +35,7 @@ public class ScorecardCatalogService {
List<ScorecardCatalog> dbList = scorecardCatalogMapper.findIsExist(scorecardCatalog.getCatalogName(),
scorecardCatalog.getParentId(), scorecardCatalog.getCode());
if(!dbList.isEmpty() && !dbList.get(0).getId().equals(scorecardCatalog.getId())) {
throw new Exception("存在同名目录");
throw new Exception("名称重复,请重新输入!");
}
}
//获取parentId拼接idPath
......
......@@ -26,7 +26,7 @@ public class ShortboardCatalogService {
if(shortboardCatalog.getId()==null) {//新增
if(!shortboardCatalogMapper.findIsExist(shortboardCatalog.getCatalogName(),
shortboardCatalog.getParentId(), shortboardCatalog.getCode()).isEmpty()) {
throw new Exception("存在同名目录");
throw new Exception("名称重复,请重新输入!");
}
//保存
shortboardCatalogMapper.insert(shortboardCatalog);
......@@ -34,7 +34,7 @@ public class ShortboardCatalogService {
List<ShortboardCatalog> dbList = shortboardCatalogMapper.findIsExist(shortboardCatalog.getCatalogName(),
shortboardCatalog.getParentId(), shortboardCatalog.getCode());
if(!dbList.isEmpty() && !dbList.get(0).getId().equals(shortboardCatalog.getId())) {
throw new Exception("存在同名目录");
throw new Exception("名称重复,请重新输入!");
}
}
//获取parentId拼接idPath
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment