package org.jeecg.modules.system.mapper; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.jeecg.modules.system.entity.SysRole; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.jeecg.common.doc.vo.PathPermissionVO; import java.util.List; /** *

* 角色表 Mapper 接口 *

* * @Author scott * @since 2018-12-19 */ public interface SysRoleMapper extends BaseMapper { /** * @Author scott * @Date 2019/12/13 16:12 * @Description: 删除角色与用户关系 */ @Delete("delete from sys_user_role where role_id = #{roleId}") void deleteRoleUserRelation(@Param("roleId") String roleId); /** * @Author scott * @Date 2019/12/13 16:12 * @Description: 删除角色与权限关系 */ @Delete("delete from sys_role_permission where role_id = #{roleId}") void deleteRolePermissionRelation(@Param("roleId") String roleId); @Select("select id as roleId, role_name as roleName from sys_role") List queryPathRoles(); @Select("select b.id as userId, b.realname as userName from sys_user_role a join sys_user b on a.user_id = b.id where a.role_id = #{roleId}") List queryPathRoleUsers(@Param("roleId") String roleId); }