package com.tievd.cube.modules.system.mapper;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
import com.tievd.cube.modules.system.entity.SysUserRole;
|
|
import java.util.List;
|
|
/**
|
* 用户角色管理
|
*
|
* @author 杨欣武
|
* @version 2.4.0
|
* @since 2022-05-07
|
*/
|
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
|
|
@Select("select role_code from sys_role where id in (select role_id from sys_user_role where user_id = (select id from sys_user where username=#{username}))")
|
List<String> getRoleByUserName(@Param("username") String username);
|
|
@Select("select id from sys_role where id in (select role_id from sys_user_role where user_id = (select id from sys_user where username=#{username}))")
|
List<String> getRoleIdByUserName(@Param("username") String username);
|
}
|