File was renamed from src/main/java/com/whyc/mapper/RolePrivilegeMapper.java |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.pojo.Privilege; |
| | | import com.whyc.pojo.RolePrivilege; |
| | | import com.whyc.pojo.Permission; |
| | | import com.whyc.pojo.RolePermission; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | |
| | | /** |
| | | * 角色-权限 |
| | | */ |
| | | public interface RolePrivilegeMapper extends CustomMapper<RolePrivilege> { |
| | | public interface RolePermissionMapper extends CustomMapper<RolePermission> { |
| | | |
| | | @Select("select p.privilege from tb_role_privilege rp inner join tb_privilege p on rp.privilege_id = p.id inner join tb_user_role ur\n" + |
| | | "on rp.role_id = ur.role_id\n" + |
| | | "where ur.user_id=1 \n") |
| | | List<Privilege> getPrivileges(Integer userId); |
| | | List<Permission> getPermissions(Integer userId); |
| | | } |