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