style: 优化登录用户信息角色相关信息命名

1.roles => roleCodes
2.roleSet => roles
This commit is contained in:
2023-09-02 00:12:45 +08:00
parent d20aadfc93
commit be394f3de4
6 changed files with 8 additions and 8 deletions

View File

@@ -108,7 +108,7 @@ public class DataPermissionHandlerImpl implements DataPermissionHandler {
*/
private static Expression buildDataScopeFilter(LoginUser user, String tableAlias, Expression where) {
Expression expression = null;
for (RoleDTO role : user.getRoleSet()) {
for (RoleDTO role : user.getRoles()) {
DataScopeEnum dataScope = role.getDataScope();
if (DataScopeEnum.ALL.equals(dataScope)) {
return where;

View File

@@ -60,12 +60,12 @@ public class LoginUser implements Serializable {
/**
* 角色编码集合
*/
private Set<String> roles;
private Set<String> roleCodes;
/**
* 角色集合
*/
private Set<RoleDTO> roleSet;
private Set<RoleDTO> roles;
/**
* 令牌