package com.m2pool.lease.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.m2pool.lease.dto.v2.*;
import com.m2pool.lease.entity.LeaseMachineConfig;
import com.m2pool.lease.vo.BaseVo;
import com.m2pool.lease.vo.v2.CoinAndAlgorithmVo;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * GPU对应币种挖矿算力(只要gpu类型相同那么就使用这个配置) Mapper 接口
 * </p>
 *
 * @author yyb
 * @since 2025-11-27
 */
@Mapper
public interface LeaseMachineConfigMapper extends BaseMapper<LeaseMachineConfig> {
    /**
     * 获取配置列表
     * @param coin
     * @param algorithm
     * @return
     */
    List<MiningConfigSelectDto>  getConfigList(@Param("coin") String coin,@Param("algorithm") String algorithm);



    /**
     * 获取矿机支持的币种和算法
     * @return
     */
    List<CoinAndAlgorithmDto> getMachineSupportCoinAndAlgorithm(@Param("machineIds") List<BaseVo> machineIds);


    /**
     * 获取理论算力
     * @return
     */
    List<MachineHashRateMapDto> getTheoryHashRate(@Param("list") List<OrderMiningInfoDto> orderMiningInfoDtoList);
}
