wangfeng %!s(int64=5) %!d(string=hai) anos
pai
achega
bed9d6bf02

+ 3 - 1
icss-service/src/main/java/com/diagbot/facade/TemplateInfoFacade.java

@@ -125,7 +125,9 @@ public class TemplateInfoFacade extends TemplateInfoServiceImpl {
         templates.allEq(mapAll);
         TemplateInfo datas = getOne(templates, false);
         if (datas != null) {
-            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该模板名已存在");
+            if(!datas.getId().equals(templateInfoRevampVO.getId())){
+                throw new CommonException(CommonErrorCode.NOT_EXISTS, "该模板名已存在");
+            }
         }
         //3.修改表数据的模板名字
         TemplateInfo templateInfo = new TemplateInfo();

+ 3 - 1
icss-service/src/main/java/com/diagbot/facade/TemplateNormFacade.java

@@ -101,7 +101,9 @@ public class TemplateNormFacade extends TemplateInfoServiceImpl {
         templates.allEq(mapAll);
         TemplateInfo datas = getOne(templates, false);
         if (datas != null) {
-            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该模板名已存在");
+            if(!datas.getId().equals(templateNormUpVO.getId())){
+                throw new CommonException(CommonErrorCode.NOT_EXISTS, "该模板名已存在");
+            }
         }
         //3.修改表数据的模板名字
         TemplateInfo templateInfo = new TemplateInfo();