package com.ads.business.dao;

import com.ads.business.entity.Doc;
import com.ads.business.service.model.response.DocListResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hou
 * @since 2021-10-21
 */
public interface DocDao extends BaseMapper<Doc> {


    /**
     * 分页查询数据
     * @param page
     * @param wrapper
     * @return
     */

    Page<DocListResponse> findPage(@Param("page") Page page, @Param(Constants.WRAPPER) QueryWrapper<DocListResponse> wrapper);

    List<DocListResponse> findList(@Param(Constants.WRAPPER)QueryWrapper<DocListResponse> wrapper);
}
