fix(permissionPoint): 使用单位类型扩展支持
This commit is contained in:
parent
034622e26f
commit
fad9ad47db
@ -164,13 +164,10 @@ public class PermissionPointVO {
|
||||
private String delegatedTypeDesc;
|
||||
|
||||
public void applyFitOuTypeBit(long fitOuTypeBit) {
|
||||
//这个最值需要处理
|
||||
if (fitOuTypeBit > 63L) {
|
||||
fitOuTypeBit = 63L;
|
||||
}
|
||||
long mask = 1L;
|
||||
ArrayList<Long> list = new ArrayList<>();
|
||||
while (mask <= 32) {
|
||||
//这个最值依赖枚举可支持的最大值 - 避免数据为65535解析出多的数据
|
||||
while (mask <= 64) {
|
||||
long bitValue = fitOuTypeBit & mask;
|
||||
if (bitValue != 0) {
|
||||
list.add(bitValue);
|
||||
@ -182,9 +179,6 @@ public class PermissionPointVO {
|
||||
|
||||
public void applyFitOuNodeTypeBit(long fitOuNodeTypeBit) {
|
||||
//这个最值需要处理
|
||||
if (fitOuNodeTypeBit > 7L) {
|
||||
fitOuNodeTypeBit = 7L;
|
||||
}
|
||||
long mask = 1L;
|
||||
ArrayList<Long> list = new ArrayList<>();
|
||||
while (mask <= 32) {
|
||||
|
||||
@ -14,7 +14,7 @@ public class SimpleTest {
|
||||
public void testSplitBit() {
|
||||
|
||||
PermissionPointVO vo = new PermissionPointVO();
|
||||
vo.applyFitOuTypeBit(34L);
|
||||
vo.applyFitOuTypeBit(65535L);
|
||||
System.out.println(vo.getFitOuTypeList());
|
||||
vo.applyFitOuTypeBit(65535L);
|
||||
System.out.println(vo.getFitOuTypeList());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user