RoleDao.java 515 B

12345678910111213141516
  1. package com.nokia.dao;
  2. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  3. import com.nokia.pojo.RoleEntity;
  4. import java.util.List;
  5. import org.apache.ibatis.annotations.Mapper;
  6. import org.apache.ibatis.annotations.Select;
  7. @Mapper
  8. public interface RoleDao extends BaseMapper<RoleEntity> {
  9. @Select("select r.role_id, r.role_name, r.system from sqmdb_rpt.acl_role r, sqmdb_rpt.acl_user_role ur where r.role_id = ur.role_id and ur.user_id = #{userId}")
  10. List<RoleEntity> findByUserId(Integer userId);
  11. }