package ink.wgink.module.file.dao.filedownload;

import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.interfaces.init.IInitBaseTable;
import ink.wgink.module.file.pojo.dtos.filedownload.FileDownloadDTO;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: IFileDownloadDao
 * @Description: 文件下载
 * @Author: wanggeng
 * @Date: 2022/8/2 09:58
 * @Version: 1.0
 */
@Repository
public interface IFileDownloadDao extends IInitBaseTable {

    /**
     * 新增下载记录
     *
     * @param params
     */
    void save(Map<String, Object> params) throws SaveException;

    /**
     * 下载记录列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<FileDownloadDTO> list(Map<String, Object> params) throws SearchException;

    /**
     * 下载记录统计
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer count(Map<String, Object> params) throws SearchException;
}
