package com.red.circle.order.infra.database.rds.service.pay;

import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.mybatis.service.BaseService;
import com.red.circle.order.infra.database.rds.entity.pay.PayCountry;
import com.red.circle.order.inner.model.cmd.SysPayCountryQryCmd;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 开通支付国家 服务类.
 * </p>
 *
 * @author pengshigang
 * @since 2021-12-08
 */
public interface PayCountryService extends BaseService<PayCountry> {

  /**
   * 获取所有上架国家.
   */
  List<PayCountry> listAllShelf();

  /**
   * 获取上架权重最高对国家.
   */
  PayCountry getShelfSortMax();

  /**
   * 根据id获得国家.
   */
  Map<Long, PayCountry> mapByIds(Set<Long> ids);

  /**
   * 获取国家.
   */
  List<PayCountry> listByIds(Set<Long> ids);

  PageResult<PayCountry> pageOpenPayCountry(SysPayCountryQryCmd query);

  List<PayCountry> listOpenPayCountry(Set<Long> ids);

  void delOpenPayCountry(List<Long> ids);

  void updateUsdExchangeRate(Long id, BigDecimal rate);

  void updateCountryCurrency(Long id, String currency);

  void updateSort(Long id, Integer sort);

  void shelf(Long id, Boolean shelf);
}
