package com.jxy.marketall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jxy.common.datasource.annotation.BiAnDb2;
import com.jxy.marketall.dto.BiAnVolumeDto;
import com.jxy.marketall.dto.BiAnWSDto;
import com.jxy.marketall.dto.CoinPriceListDto;
import com.jxy.marketall.entity.BiAn;
import com.jxy.marketall.entity.CoinMarketData;
import com.jxy.marketall.vo.BiAnHourVo;
import com.jxy.marketall.vo.BiAnLimitVo;
import com.jxy.marketall.vo.BiAnVo;
import com.jxy.marketall.vo.CoinVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description TODO
 * @Date 2022/6/20 17:36
 * @Author 杜懿
 */

@BiAnDb2
public interface BiAnMapper2 extends BaseMapper<BiAn> {

    /**
     * 条件查询数据库  时间间隔为小时、天等
     * @param biAnVo
     * @return
     */
    public List<BiAn> selectLongTimeDataByCondition(@Param("biAnVo") BiAnVo biAnVo);


    public List<BiAn> selectKLineByEndTime(@Param("table") String table, @Param("end") String end);

    public List<BiAn> selectKLineByStartTime(@Param("table") String table, @Param("start") String start);

    //public BiAn selectFirstData(@Param("biAnVo") BiAnVo biAnVo);

    public void inserthBtcusdtPERP(@Param("dto") BiAnWSDto biAnWSDto);

    public void insertBtcusdtPERP(@Param("dto") BiAnWSDto biAnWSDto,@Param("table") String table);

    //db:coinmarketcap table:marketInfo
    public List<CoinPriceListDto>  getCoinRankList();

    //24小时币价
    public List<CoinMarketData>  getCoinDailyList(@Param("symbol") String symbol);

    public List<CoinMarketData>  getPriceListByCoin(@Param("vo") CoinVo vo);

}
