From 2852d10c220d84d5b115132ea227f7fb2607c4d8 Mon Sep 17 00:00:00 2001 From: smallchill Date: Sun, 8 Dec 2019 22:04:13 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/springblade/system/service/impl/MenuServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java index 99095166..cd1bf543 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java @@ -171,6 +171,9 @@ public class MenuServiceImpl extends ServiceImpl implements IM @Override public boolean submit(Menu menu) { + if (menu.getParentId() == null && menu.getId() == null) { + menu.setParentId(BladeConstant.TOP_PARENT_ID); + } menu.setIsDeleted(BladeConstant.DB_NOT_DELETED); return saveOrUpdate(menu); }