package com.whyc.mapper;
|
|
import com.whyc.pojo.Permission;
|
import com.whyc.pojo.RolePermission;
|
import org.apache.ibatis.annotations.Select;
|
|
import java.util.List;
|
|
/**
|
* 角色-权限
|
*/
|
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<Permission> getPermissions(Integer userId);
|
}
|