package com.crm.ib.task.dao.mapper;

import com.crm.rely.backend.core.pojo.table.TradeHistoryTable;
import com.crm.rely.backend.model.entity.report.VolumeReportEntity;
import com.crm.rely.backend.model.pojo.view.VolumeReportView;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;

/**
 * Created by max on 2020/12/1.
 */
@Component
public interface TradeHistoryDao {

    void saveInBatch(@Param("list") List<TradeHistoryTable> tables, @Param("platform") String platform, @Param("ym") String ym);

    void createTradeTable(@Param("ym") String ym, @Param("platform") String platform);

    List<Long> findAllTradeBetweenDate(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("platform") String platform, @Param("ym") String ym);

    List<Integer> countVolumeReport(VolumeReportEntity entity);

    List<VolumeReportView> listVolumeReport(VolumeReportEntity entity);

    List<VolumeReportView> sumVolumeReport(VolumeReportEntity entity);

    Integer countSalesVolumeReport(VolumeReportEntity entity);

    List<VolumeReportView> listSalesVolumeReport(VolumeReportEntity entity);

    VolumeReportView sumSalesVolumeReport(VolumeReportEntity entity);

}
