Commit 73ea477d by hzc

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

parent 7f0242f6
...@@ -28,7 +28,7 @@ public class DriveIndCatalogService { ...@@ -28,7 +28,7 @@ public class DriveIndCatalogService {
if(driveIndCatalog.getId()==null) {//新增 if(driveIndCatalog.getId()==null) {//新增
if(!driveIndCatalogMapper.findIsExist(driveIndCatalog.getCatalogName(), if(!driveIndCatalogMapper.findIsExist(driveIndCatalog.getCatalogName(),
driveIndCatalog.getParentId(), driveIndCatalog.getCode()).isEmpty()) { driveIndCatalog.getParentId(), driveIndCatalog.getCode()).isEmpty()) {
throw new Exception("存在同名目录"); throw new Exception("名称重复,请重新输入!");
} }
//保存 //保存
driveIndCatalogMapper.insert(driveIndCatalog); driveIndCatalogMapper.insert(driveIndCatalog);
...@@ -36,7 +36,7 @@ public class DriveIndCatalogService { ...@@ -36,7 +36,7 @@ public class DriveIndCatalogService {
List<DriveIndCatalog> dbList = driveIndCatalogMapper.findIsExist(driveIndCatalog.getCatalogName(), List<DriveIndCatalog> dbList = driveIndCatalogMapper.findIsExist(driveIndCatalog.getCatalogName(),
driveIndCatalog.getParentId(), driveIndCatalog.getCode()); driveIndCatalog.getParentId(), driveIndCatalog.getCode());
if(!dbList.isEmpty() && !dbList.get(0).getId().equals(driveIndCatalog.getId())) { if(!dbList.isEmpty() && !dbList.get(0).getId().equals(driveIndCatalog.getId())) {
throw new Exception("存在同名目录"); throw new Exception("名称重复,请重新输入!");
} }
} }
//获取parentId拼接idPath //获取parentId拼接idPath
......
...@@ -28,7 +28,7 @@ public class IndCatalogService { ...@@ -28,7 +28,7 @@ public class IndCatalogService {
if(indCatalog.getId()==null) {//新增 if(indCatalog.getId()==null) {//新增
if(!indCatalogMapper.findIsExist(indCatalog.getCatalogName(), indCatalog.getParentId(), if(!indCatalogMapper.findIsExist(indCatalog.getCatalogName(), indCatalog.getParentId(),
indCatalog.getCode()).isEmpty()) { indCatalog.getCode()).isEmpty()) {
throw new Exception("存在同名目录"); throw new Exception("名称重复,请重新输入!");
} }
//保存 //保存
indCatalogMapper.insert(indCatalog); indCatalogMapper.insert(indCatalog);
...@@ -36,7 +36,7 @@ public class IndCatalogService { ...@@ -36,7 +36,7 @@ public class IndCatalogService {
List<IndCatalog> dbList = indCatalogMapper.findIsExist(indCatalog.getCatalogName(), indCatalog.getParentId(), List<IndCatalog> dbList = indCatalogMapper.findIsExist(indCatalog.getCatalogName(), indCatalog.getParentId(),
indCatalog.getCode()); indCatalog.getCode());
if(!dbList.isEmpty() && !dbList.get(0).getId().equals(indCatalog.getId())) { if(!dbList.isEmpty() && !dbList.get(0).getId().equals(indCatalog.getId())) {
throw new Exception("存在同名目录"); throw new Exception("名称重复,请重新输入!");
} }
} }
//获取parentId拼接idPath //获取parentId拼接idPath
......
...@@ -27,7 +27,7 @@ public class ScoreRuleCatalogService { ...@@ -27,7 +27,7 @@ public class ScoreRuleCatalogService {
if(scoreRuleCatalog.getId()==null) {//新增 if(scoreRuleCatalog.getId()==null) {//新增
if(!scoreRuleCatalogMapper.findIsExist(scoreRuleCatalog.getCatalogName(), if(!scoreRuleCatalogMapper.findIsExist(scoreRuleCatalog.getCatalogName(),
scoreRuleCatalog.getParentId(), scoreRuleCatalog.getCode()).isEmpty()) { scoreRuleCatalog.getParentId(), scoreRuleCatalog.getCode()).isEmpty()) {
throw new Exception("存在同名目录"); throw new Exception("名称重复,请重新输入!");
} }
//保存 //保存
scoreRuleCatalogMapper.insert(scoreRuleCatalog); scoreRuleCatalogMapper.insert(scoreRuleCatalog);
...@@ -35,7 +35,7 @@ public class ScoreRuleCatalogService { ...@@ -35,7 +35,7 @@ public class ScoreRuleCatalogService {
List<ScoreRuleCatalog> dbList = scoreRuleCatalogMapper.findIsExist(scoreRuleCatalog.getCatalogName(), List<ScoreRuleCatalog> dbList = scoreRuleCatalogMapper.findIsExist(scoreRuleCatalog.getCatalogName(),
scoreRuleCatalog.getParentId(), scoreRuleCatalog.getCode()); scoreRuleCatalog.getParentId(), scoreRuleCatalog.getCode());
if(!dbList.isEmpty() && !dbList.get(0).getId().equals(scoreRuleCatalog.getId())) { if(!dbList.isEmpty() && !dbList.get(0).getId().equals(scoreRuleCatalog.getId())) {
throw new Exception("存在同名目录"); throw new Exception("名称重复,请重新输入!");
} }
} }
//获取parentId拼接idPath //获取parentId拼接idPath
......
...@@ -27,7 +27,7 @@ public class ScorecardCatalogService { ...@@ -27,7 +27,7 @@ public class ScorecardCatalogService {
if(scorecardCatalog.getId()==null) {//新增 if(scorecardCatalog.getId()==null) {//新增
if(!scorecardCatalogMapper.findIsExist(scorecardCatalog.getCatalogName(), if(!scorecardCatalogMapper.findIsExist(scorecardCatalog.getCatalogName(),
scorecardCatalog.getParentId(), scorecardCatalog.getCode()).isEmpty()) { scorecardCatalog.getParentId(), scorecardCatalog.getCode()).isEmpty()) {
throw new Exception("存在同名目录"); throw new Exception("名称重复,请重新输入!");
} }
//保存 //保存
scorecardCatalogMapper.insert(scorecardCatalog); scorecardCatalogMapper.insert(scorecardCatalog);
...@@ -35,7 +35,7 @@ public class ScorecardCatalogService { ...@@ -35,7 +35,7 @@ public class ScorecardCatalogService {
List<ScorecardCatalog> dbList = scorecardCatalogMapper.findIsExist(scorecardCatalog.getCatalogName(), List<ScorecardCatalog> dbList = scorecardCatalogMapper.findIsExist(scorecardCatalog.getCatalogName(),
scorecardCatalog.getParentId(), scorecardCatalog.getCode()); scorecardCatalog.getParentId(), scorecardCatalog.getCode());
if(!dbList.isEmpty() && !dbList.get(0).getId().equals(scorecardCatalog.getId())) { if(!dbList.isEmpty() && !dbList.get(0).getId().equals(scorecardCatalog.getId())) {
throw new Exception("存在同名目录"); throw new Exception("名称重复,请重新输入!");
} }
} }
//获取parentId拼接idPath //获取parentId拼接idPath
......
...@@ -26,7 +26,7 @@ public class ShortboardCatalogService { ...@@ -26,7 +26,7 @@ public class ShortboardCatalogService {
if(shortboardCatalog.getId()==null) {//新增 if(shortboardCatalog.getId()==null) {//新增
if(!shortboardCatalogMapper.findIsExist(shortboardCatalog.getCatalogName(), if(!shortboardCatalogMapper.findIsExist(shortboardCatalog.getCatalogName(),
shortboardCatalog.getParentId(), shortboardCatalog.getCode()).isEmpty()) { shortboardCatalog.getParentId(), shortboardCatalog.getCode()).isEmpty()) {
throw new Exception("存在同名目录"); throw new Exception("名称重复,请重新输入!");
} }
//保存 //保存
shortboardCatalogMapper.insert(shortboardCatalog); shortboardCatalogMapper.insert(shortboardCatalog);
...@@ -34,7 +34,7 @@ public class ShortboardCatalogService { ...@@ -34,7 +34,7 @@ public class ShortboardCatalogService {
List<ShortboardCatalog> dbList = shortboardCatalogMapper.findIsExist(shortboardCatalog.getCatalogName(), List<ShortboardCatalog> dbList = shortboardCatalogMapper.findIsExist(shortboardCatalog.getCatalogName(),
shortboardCatalog.getParentId(), shortboardCatalog.getCode()); shortboardCatalog.getParentId(), shortboardCatalog.getCode());
if(!dbList.isEmpty() && !dbList.get(0).getId().equals(shortboardCatalog.getId())) { if(!dbList.isEmpty() && !dbList.get(0).getId().equals(shortboardCatalog.getId())) {
throw new Exception("存在同名目录"); throw new Exception("名称重复,请重新输入!");
} }
} }
//获取parentId拼接idPath //获取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