From b48b8731604123bd28a6dc2170eaa9703e42ea52 Mon Sep 17 00:00:00 2001 From: linbangquan <1437892690@qq.com> Date: Fri, 19 Jan 2024 12:21:26 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96-=E7=9B=AE=E5=BD=95=E7=AE=A1=E7=90=86-=E5=AD=90?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E6=8B=96=E5=88=B0=E6=A0=B9=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1067341125746688]自动化-目录管理-子目录拖到根目录接口报错 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1067341125746688 --- .../autoexec/api/service/MoveAutoexecServiceApi.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/neatlogic/module/autoexec/api/service/MoveAutoexecServiceApi.java b/src/main/java/neatlogic/module/autoexec/api/service/MoveAutoexecServiceApi.java index 3cf68a4e..635982aa 100644 --- a/src/main/java/neatlogic/module/autoexec/api/service/MoveAutoexecServiceApi.java +++ b/src/main/java/neatlogic/module/autoexec/api/service/MoveAutoexecServiceApi.java @@ -78,12 +78,14 @@ public class MoveAutoexecServiceApi extends PrivateApiComponentBase { throw new MoveTargetNodeIllegalException(); } AutoexecServiceNodeVo moveServiceNode = autoexecServiceMapper.getAutoexecServiceNodeById(id); - AutoexecServiceNodeVo targetServiceNode = autoexecServiceMapper.getAutoexecServiceNodeById(targetId); if (moveServiceNode == null) { throw new AutoexecServiceNotFoundException(id); } - if (targetServiceNode == null) { - throw new AutoexecServiceNotFoundException(targetId); + if (targetId != 0L) { + AutoexecServiceNodeVo targetServiceNode = autoexecServiceMapper.getAutoexecServiceNodeById(targetId); + if (targetServiceNode == null) { + throw new AutoexecServiceNotFoundException(targetId); + } } LRCodeManager.moveTreeNode("autoexec_service", "id", "parent_id", id, MoveType.getMoveType(moveType), targetId); -- Gitee