...
|
...
|
@@ -242,26 +242,27 @@ public class PermissionServiceImp implements PermissionService { |
|
|
USERS user = JSONObject.parseObject(userJsonStr, USERS.class);
|
|
|
PERMISSION result = user.getPermissions().stream()
|
|
|
.filter(permission -> {
|
|
|
if (name.equals(permission.getName())) {
|
|
|
if (permission.getName().equals(name)) {
|
|
|
System.out.println("权限名匹配");
|
|
|
return true;
|
|
|
}
|
|
|
if (url.equals(permission.getUrl())){
|
|
|
if (permission.getUrl().equals(url)){
|
|
|
System.out.println("url匹配");
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
|
})
|
|
|
.findFirst()
|
|
|
.findAny()
|
|
|
.orElse(null);
|
|
|
// 输出查询结果
|
|
|
if (result != null) {
|
|
|
System.out.println("匹配到对应权限");
|
|
|
log.info("匹配到对应权限-{}-{}",result.getName(),result.getUrl());
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
log.error("[PERM-CHECK]-查询用户权限匹配错误",e);
|
|
|
return false;
|
|
|
}
|
|
|
return false;
|
...
|
...
|
|