package org.dromara.zhishu.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.dromara.common.mybatis.annotation.DataColumn;
import org.dromara.common.mybatis.annotation.DataPermission;
import org.dromara.zhishu.domain.FilterSet;
import org.dromara.zhishu.domain.bo.FilterSetBo;
import org.dromara.zhishu.domain.vo.FilterSetVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

import java.util.List;

/**
 * 过滤设置Mapper接口
 *
 * @author yxy
 * @date 2025-04-14
 */
@Mapper
public interface FilterSetMapper extends BaseMapperPlus<FilterSet, FilterSetVo> {

    @Override
    @DataPermission({
            @DataColumn(key = "userName", value = "create_by")
    })
    default <P extends IPage<FilterSetVo>> P selectVoPage(IPage<FilterSet> page, Wrapper<FilterSet> wrapper) {
        return selectVoPage(page, wrapper, this.currentVoClass());
    }

    List<FilterSetVo> selectVoListByBo(FilterSetBo bo);

    int deleteTrueById(Long id);
}
