From 2fd3ce8c8877a4f9bbd3fe86780e4e3c325190c6 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Fri, 6 Sep 2024 18:16:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=A8=E4=BE=8B=E8=84=91=E5=9B=BE=E7=A9=BA?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E6=8A=A5=E9=94=99=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1045765 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001045765 --- .../service/FunctionalCaseMinderService.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java index 5e3b0ae2af..0b2985a2f8 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/FunctionalCaseMinderService.java @@ -777,12 +777,12 @@ public class FunctionalCaseMinderService { private MindAdditionalNode updateNode(String userId, MindAdditionalNodeRequest mindAdditionalNodeRequest, MindAdditionalNodeMapper mindAdditionalNodeMapper) { MindAdditionalNode mindAdditionalNode = new MindAdditionalNode(); mindAdditionalNode.setId(mindAdditionalNodeRequest.getId()); - if (mindAdditionalNodeRequest.getName().length() > 255) { - mindAdditionalNodeRequest.setName(mindAdditionalNodeRequest.getName().substring(0, 249)); - } if (StringUtils.isBlank(mindAdditionalNodeRequest.getName())) { throw new MSException(Translator.get("minder_extra_node.text_node_empty")); } + if (mindAdditionalNodeRequest.getName().length() > 255) { + mindAdditionalNodeRequest.setName(mindAdditionalNodeRequest.getName().substring(0, 249)); + } mindAdditionalNode.setName(mindAdditionalNodeRequest.getName()); mindAdditionalNode.setParentId(mindAdditionalNodeRequest.getParentId()); mindAdditionalNode.setUpdateTime(System.currentTimeMillis()); @@ -795,12 +795,12 @@ public class FunctionalCaseMinderService { private MindAdditionalNode buildNode(FunctionalCaseMinderEditRequest request, String userId, MindAdditionalNodeRequest mindAdditionalNodeRequest, MindAdditionalNodeMapper additionalNodeMapper) { MindAdditionalNode mindAdditionalNode = new MindAdditionalNode(); mindAdditionalNode.setId(mindAdditionalNodeRequest.getId()); - if (mindAdditionalNodeRequest.getName().length() > 255) { - mindAdditionalNodeRequest.setName(mindAdditionalNodeRequest.getName().substring(0, 249)); - } if (StringUtils.isBlank(mindAdditionalNodeRequest.getName())) { throw new MSException(Translator.get("minder_extra_node.text_node_empty")); } + if (mindAdditionalNodeRequest.getName().length() > 255) { + mindAdditionalNodeRequest.setName(mindAdditionalNodeRequest.getName().substring(0, 249)); + } mindAdditionalNode.setName(mindAdditionalNodeRequest.getName()); mindAdditionalNode.setParentId(mindAdditionalNodeRequest.getParentId()); mindAdditionalNode.setProjectId(request.getProjectId());