查询用户角色.

This commit is contained in:
lijiahang
2024-04-26 16:01:06 +08:00
parent 1decd92bd9
commit 4fb4afdd53
11 changed files with 35 additions and 199 deletions

View File

@@ -40,4 +40,12 @@ public interface SystemRoleDAO extends IMapper<SystemRoleDO> {
*/
Long getRoleIdByUserIdAndRoleCode(@Param("userId") Long userId, @Param("code") String code);
/**
* 查询用户角色
*
* @param userId userId
* @return roles
*/
List<SystemRoleDO> selectRoleByUserId(@Param("userId") Long userId);
}

View File

@@ -8,6 +8,7 @@ import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 用户 视图响应对象
@@ -61,4 +62,7 @@ public class SystemUserVO implements Serializable {
@Schema(description = "修改人")
private String updater;
@Schema(description = "用户角色")
private List<SystemRoleVO> roles;
}