package com.smppw.modaq.domain.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smppw.modaq.domain.entity.EmailFileInfoDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface EmailFileInfoMapper extends BaseMapper<EmailFileInfoDO> {

    Integer insertById(@Param("itemDo") EmailFileInfoDO emailFileInfoDO);

//    EmailFileInfoDO getEmailFileById(@Param("id") Integer fileId);
//
//    List<EmailFileInfoDO> getEmailFileByEmailId(@Param("emailId") Integer emailId);

    List<EmailFileInfoDO> queryByEmailId(@Param("emailId") Integer emailId);

//    List<FundFileInfoVO> searchFundFileInfo(FundFilePageQuery fundFilePageQuery);
//
//    List<EmailParseDetailDO> searchEmailDetailById(EmailFileQuery emailFileQuery);
//
//    long countFundFileInfo(FundFilePageQuery fundFilePageQuery);
//
//    long countEmailDetailById(EmailFileQuery emailFileQuery);

    void updateTimeById(@Param("id") Integer fileId, @Param("parseDate") Date parseDate);

//    List<Integer> selectValuationFileId(@Param("fileIdList") List<Integer> fileIdList);
//
//    List<String> getAllPriceDateByFileId(@Param("fileId") Integer fileId);

    int batchUpdateByFileId(@Param("entityList") List<EmailFileInfoDO> entityList);

    int getLetterFilenameSuccessCount(@Param("emailTitle") String emailTitle,
                                      @Param("filename") String filename);

    int getAmacFilenameSuccessCount(@Param("emailTitle") String emailTitle,
                                    @Param("filename") String filename,
                                    @Param("fileSize") long fileSize);

    int getWeeklyFilenameSuccessCount(@Param("emailTitle") String emailTitle,
                                      @Param("filename") String filename,
                                      @Param("fileSize") long fileSize);

    int getOtherFilenameSuccessCount(@Param("emailTitle") String emailTitle,
                                     @Param("filename") String filename,
                                     @Param("fileSize") long fileSize);
}
