e25a2efee1f974c670294f78e610603eba250cc0.svn-base 887 B

12345678910111213141516171819202122232425
  1. package org.jeecg.modules.system.mapper;
  2. import java.util.List;
  3. import org.apache.ibatis.annotations.Param;
  4. import org.apache.ibatis.annotations.Select;
  5. import org.jeecg.modules.system.entity.SysUserRole;
  6. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  7. /**
  8. * <p>
  9. * 用户角色表 Mapper 接口
  10. * </p>
  11. *
  12. * @Author scott
  13. * @since 2018-12-21
  14. */
  15. public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
  16. @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}))")
  17. List<String> getRoleByUserName(@Param("username") String username);
  18. @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}))")
  19. List<String> getRoleIdByUserName(@Param("username") String username);
  20. }