package com.m2pool.lease.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.m2pool.lease.dto.ChainAndCoinDto;
import com.m2pool.lease.dto.PayConfigDto;
import com.m2pool.lease.entity.LeaseShop;
import com.m2pool.lease.entity.LeaseShopConfig;
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;
import java.util.Set;

/**
 * <p>
 * 店铺表 Mapper 接口
 * </p>
 *
 * @author yyb
 * @since 2025-08-05
 */
@Mapper
public interface LeaseShopMapper extends BaseMapper<LeaseShop> {

     /**
      * 获取买家自定义的支付地址和支付币种和链
      * @param chainAndCoinSet
      * @return
      */
     List<LeaseShopConfig> getPayAddressAndPayCoin(@Param("chainAndCoinSet") Set<ChainAndCoinDto> chainAndCoinSet);


     /**
      * 获取单个店铺钱包信息
      * @param shopId
      * @return
      */
     List<PayConfigDto> getShopWalletInfo(@Param("shopId") Long shopId);


     /**
      * 获取多个店铺钱包信息
      * @param shopIds
      * @return
      */
     List<PayConfigDto> getShopWalletInfoList(@Param("shopIds") List<Long> shopIds);


     /**
      * 根据商品id集合获取店铺id集合
      * @param machineIds
      * @return
      */
     List<Long> getShopIdsByMachineIds(@Param("machineIds") List<Long> machineIds);

     /**
      * 根据店铺id集合获取店铺名称
      * @param shopIds
      * @return
      */
     @MapKey("id")
    Map<Long,LeaseShop> getShopNameMapByIds(@Param("shopIds") List<Long> shopIds);
}
