Files
youlai-boot/src/main/java/com/youlai/boot/system/mapper/RoleDeptMapper.java

36 lines
875 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.youlai.boot.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.youlai.boot.system.model.entity.RoleDept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 角色部门关联持久层
*
* @author Ray.Hao
* @since 3.0.0
*/
@Mapper
public interface RoleDeptMapper extends BaseMapper<RoleDept> {
/**
* 根据角色ID获取部门ID列表
*
* @param roleId 角色ID
* @return 部门ID列表
*/
List<Long> getDeptIdsByRoleId(@Param("roleId") Long roleId);
/**
* 根据角色编码集合获取所有部门ID列表用于自定义数据权限
*
* @param roleCodes 角色编码集合
* @return 部门ID列表
*/
List<Long> getDeptIdsByRoleCodes(@Param("roleCodes") List<String> roleCodes);
}