package com.copy.trade.dao;

import com.copy.trade.entity.form.TraderDataQueryForm;
import com.copy.trade.entity.po.StatisticsData;
import com.copy.trade.entity.po.TraderData;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 统计数据表 Mapper 接口
 * </p>
 *
 * @author wz
 * @since 2022-11-29
 */
public interface StatisticsDataMapper extends BaseMapper<StatisticsData> {

   StatisticsData  dataCount(@Param("traderId")Long traderId,@Param("startTime") String startTime);
   
   List<StatisticsData>  selectStatisticsData(@Param("traderId")Long traderId,@Param("startTime") String startTime);
   
   List<BigDecimal>  selectStatisticsDataNew(@Param("traderId")Long traderId,@Param("startTime") String startTime);
   
   List<StatisticsData>  selectStatisticsDataForRetractionRate14(@Param("traderId")Long traderId,@Param("startTime") String startTime);

   BigDecimal earningsCount(@Param("traderId")Long traderId);
   
   BigDecimal earningsCountToday(@Param("traderId")Long traderId,@Param("startTime")Long startTime);
   
   BigDecimal balanceSort(@Param("traderId")Long traderId,@Param("startTime")String startTime,@Param("sort") String sort);
   
   List<StatisticsData> traderDataList(@Param("traderId") Long traderId);
   
   StatisticsData  recentStatisticsData(@Param("traderId")Long traderId);
   
   void updateMaxDateDate(@Param("traderId")Long traderId,@Param("yield14")BigDecimal yield14);
}
