Browse Source

优化菜单新增逻辑

test
smallchill 5 years ago
parent
commit
2852d10c22
  1. 3
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java

3
blade-service/blade-system/src/main/java/org/springblade/system/service/impl/MenuServiceImpl.java

@ -171,6 +171,9 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> 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);
}

Loading…
Cancel
Save