Commit 9db921f56e696ce85b217a054bd718e9cef85316
1 parent
596263f4
Update icons for substation role menus and sync icon changes to database
Showing
1 changed file
with
4 additions
and
2 deletions
src/main/java/com/diligrp/rider/service/impl/MenuBootstrapServiceImpl.java
| ... | ... | @@ -84,8 +84,8 @@ public class MenuBootstrapServiceImpl implements MenuBootstrapService { |
| 84 | 84 | defaults.add(menu("admin.user", "平台账号", "MENU", "/admin-user", "", 0L, MenuScopeEnum.PLATFORM, 104)); |
| 85 | 85 | // 分站管理员专属:站点管理目录 |
| 86 | 86 | defaults.add(menu("system.sub_root", "站点管理", "DIR", "", "SettingOutlined", 0L, MenuScopeEnum.SUBSTATION, 110)); |
| 87 | - defaults.add(menu("system.sub_role", "角色管理", "MENU", "/substation/role", "", 0L, MenuScopeEnum.SUBSTATION, 111)); | |
| 88 | - defaults.add(menu("system.sub_role_menu", "角色菜单", "MENU", "/substation/role-menu", "", 0L, MenuScopeEnum.SUBSTATION, 112)); | |
| 87 | + defaults.add(menu("system.sub_role", "角色管理", "MENU", "/substation/role", "TeamOutlined", 0L, MenuScopeEnum.SUBSTATION, 111)); | |
| 88 | + defaults.add(menu("system.sub_role_menu", "角色菜单", "MENU", "/substation/role-menu", "SettingOutlined", 0L, MenuScopeEnum.SUBSTATION, 112)); | |
| 89 | 89 | |
| 90 | 90 | Map<String, SysMenu> persisted = new LinkedHashMap<>(); |
| 91 | 91 | for (SysMenu menu : defaults) { |
| ... | ... | @@ -96,6 +96,8 @@ public class MenuBootstrapServiceImpl implements MenuBootstrapService { |
| 96 | 96 | menu.setCreateTime(System.currentTimeMillis() / 1000); |
| 97 | 97 | sysMenuMapper.insert(menu); |
| 98 | 98 | existing = menu; |
| 99 | + } else if (menu.getIcon() != null && !menu.getIcon().isBlank()) { | |
| 100 | + existing.setIcon(menu.getIcon()); | |
| 99 | 101 | } |
| 100 | 102 | persisted.put(existing.getCode(), existing); |
| 101 | 103 | } | ... | ... |