package com.smppw.modaq.domain.mapper;

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 {

    Integer insert(@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 updateAiParseByFileId(@Param("fileId") Integer fileId,
                              @Param("aiParse") Boolean aiParse,
                              @Param("aiFileId") String aiFileId);

    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);
}
