package com.ga.core.mapper.upload;

import com.ga.core.vo.upload.UploadHistoryResp;
import com.ga.core.vo.upload.UploadHistoryVO;
import com.ga.core.vo.upload.UploadTemplateSearchParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UploadHistoryMapper {

    List<UploadHistoryResp> selectList(UploadTemplateSearchParam param);

    List<UploadHistoryResp> selectByTemplate(@Param("templateId") Long templateId,
                                              UploadTemplateSearchParam param);

    int insert(UploadHistoryVO vo);

    int updateStatus(@Param("historyId") Long historyId,
                     @Param("status") String status,
                     @Param("errorMessage") String errorMessage,
                     @Param("successCount") Integer successCount,
                     @Param("errorCount") Integer errorCount,
                     @Param("skipCount") Integer skipCount,
                     @Param("totalCount") Integer totalCount,
                     @Param("errorFileId") Long errorFileId,
                     @Param("durationSec") Integer durationSec);
}
