fix:修复platform获取方式异常的bug
This commit is contained in:
@@ -32,6 +32,8 @@ public class RoleAuthorityHandler implements TsAuthorityHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
String menuPlatform = StrUtil.emptyToDefault(menu.platform(), "web");
|
||||
|
||||
List<CoreRoleAuthority> list = new ArrayList<>();
|
||||
|
||||
// 分组
|
||||
@@ -52,7 +54,7 @@ public class RoleAuthorityHandler implements TsAuthorityHandler {
|
||||
groupAuthority.setService(globalConfig.getService());
|
||||
groupAuthority.setType("group");
|
||||
groupAuthority.setLevel(level);
|
||||
groupAuthority.setPlatform(menu.platform());
|
||||
groupAuthority.setPlatform(menuPlatform);
|
||||
groupAuthority.setParent(parentId);
|
||||
groupAuthority.setVersion(version);
|
||||
groupAuthority.setId(StrUtil.join("_", groupAuthority.getService(), groupAuthority.getNo()));
|
||||
@@ -68,7 +70,7 @@ public class RoleAuthorityHandler implements TsAuthorityHandler {
|
||||
menuAuthority.setType("menu");
|
||||
menuAuthority.setLevel(groupAuthority.getLevel() + 1);
|
||||
menuAuthority.setParent(groupAuthority.getId());
|
||||
menuAuthority.setPlatform(menu.platform());
|
||||
menuAuthority.setPlatform(menuPlatform);
|
||||
menuAuthority.setVersion(version);
|
||||
menuAuthority.setId(StrUtil.join("_", menuAuthority.getService(), menuAuthority.getNo()));
|
||||
list.add(menuAuthority);
|
||||
@@ -83,7 +85,7 @@ public class RoleAuthorityHandler implements TsAuthorityHandler {
|
||||
point.setLevel(menuAuthority.getLevel() + 1);
|
||||
point.setParent(menuAuthority.getId());
|
||||
point.setVersion(version);
|
||||
point.setPlatform(StrUtil.emptyToDefault(authority.platform(), menu.platform()));
|
||||
point.setPlatform(StrUtil.emptyToDefault(authority.platform(), menuPlatform));
|
||||
point.setId(StrUtil.join("_", point.getService(), point.getNo()));
|
||||
list.add(point);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user