package ${basePackage}.module.${modulePackage}.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import ${basePackage}.module.${modulePackage}.domain.dto.${moduleClass}QueryDTO;
import ${basePackage}.module.${modulePackage}.domain.entity.${moduleClass}Entity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * [ ${tableDesc} ]
 *
 * @author ${author}
 * @version 1.0
 * @company ${company}
 * @copyright (c) 2018 ${company}Inc. All rights reserved.
 * @date ${date}
 * @since JDK1.8
 */
@Mapper
@Component
public interface ${moduleClass}Dao extends BaseMapper<${moduleClass}Entity> {

    /**
     * 分页查询
     * @param queryDTO
     * @return ${moduleClass}Entity
    */
    List<${moduleClass}Entity> queryByPage(Pagination page, @Param("queryDTO") ${moduleClass}QueryDTO queryDTO);

    /**
     * 根据id删除
     * @param id
     * @return
    */
    void deleteById(@Param("id") Long id);

    /**
     * 批量删除
     * @param idList
     * @return
    */
    void deleteByIds(@Param("idList") List<Long> idList);
}
