2024-09-27 12:21:17 +08:00
|
|
|
package cn.bunny.services.mapper;
|
|
|
|
|
2024-10-18 22:25:06 +08:00
|
|
|
import cn.bunny.dao.dto.system.rolePower.power.PowerDto;
|
2024-09-27 12:21:17 +08:00
|
|
|
import cn.bunny.dao.entity.system.Power;
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
2024-10-03 18:41:48 +08:00
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
2024-09-27 12:21:17 +08:00
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
2024-10-03 18:41:48 +08:00
|
|
|
import org.apache.ibatis.annotations.Param;
|
2024-09-27 12:21:17 +08:00
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* <p>
|
2024-10-03 18:41:48 +08:00
|
|
|
* 权限 Mapper 接口
|
2024-09-27 12:21:17 +08:00
|
|
|
* </p>
|
|
|
|
*
|
|
|
|
* @author Bunny
|
2024-10-03 18:41:48 +08:00
|
|
|
* @since 2024-10-03 16:00:52
|
2024-09-27 12:21:17 +08:00
|
|
|
*/
|
|
|
|
@Mapper
|
|
|
|
public interface PowerMapper extends BaseMapper<Power> {
|
2024-10-03 18:41:48 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* * 分页查询权限内容
|
|
|
|
*
|
|
|
|
* @param pageParams 权限分页参数
|
|
|
|
* @param dto 权限查询表单
|
|
|
|
* @return 权限分页结果
|
|
|
|
*/
|
|
|
|
IPage<Power> selectListByPage(@Param("page") Page<Power> pageParams, @Param("dto") PowerDto dto);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 物理删除权限
|
|
|
|
*
|
|
|
|
* @param ids 删除 id 列表
|
|
|
|
*/
|
|
|
|
void deleteBatchIdsWithPhysics(List<Long> ids);
|
|
|
|
|
2024-09-27 12:21:17 +08:00
|
|
|
/**
|
|
|
|
* * 根据用户id查询当前用户所有角色
|
|
|
|
*
|
|
|
|
* @param userId 用户id
|
|
|
|
*/
|
|
|
|
@NotNull
|
|
|
|
List<Power> selectListByUserId(long userId);
|
2024-09-27 16:49:01 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* * 根据权限码查询可以访问URL
|
|
|
|
*
|
|
|
|
* @param powerCodes 权限码
|
|
|
|
* @return 权限列表
|
|
|
|
*/
|
|
|
|
List<Power> selectListByPowerCodes(List<String> powerCodes);
|
2024-09-27 12:21:17 +08:00
|
|
|
}
|