package com.crm.ucard.service;

import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
import com.crm.rely.backend.core.dto.ucard.CardBlockchainConfigDto;
import com.crm.rely.backend.core.dto.ucard.CardBlockchainRateConfigDto;
import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
import com.crm.rely.backend.core.entity.ucard.*;
import com.crm.rely.backend.exception.ServiceException;

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

public interface UcardBlockchainService {
    /**
     * 区块链配置列表
     */
    ResultWithPagerDto<CardBlockchainConfigDto> getCardBlockchainConfigPageList(CardBlockchainConfigPageEntity entity) throws ServiceException;
    /**
     * 区块链配置下拉列表
     */
    BaseResultDto getCardBlockchainConfigDropdown(CardBlockchainConfigDropdownEntity entity) throws ServiceException;
    /**
     * 区块链下拉列表
     */
    BaseResultDto<List<String>> getCardBlockchainDropdown() throws ServiceException;
    /**
     * 新增区块链配置
     */
    BaseResultDto addCardBlockchainConfig(CardBlockchainConfigAddEntity entity) throws ServiceException;
    /**
     * 修改区块链配置
     */
    BaseResultDto updateCardBlockchainConfig(CardBlockchainConfigUpdateEntity entity) throws ServiceException;
    /**
     * 批量删除区块链配置
     */
    BaseResultDto deleteCardBlockchainConfig(BaseDeleteEntities entity) throws ServiceException;
    /**
     * 区块链汇率配置列表
     */
    ResultWithPagerDto<CardBlockchainRateConfigDto> getCardBlockchainRateConfigPageList(CardBlockchainRateConfigPageEntity entity) throws ServiceException;
    /**
     * 新增区块链汇率配置
     */
    BaseResultDto addCardBlockchainRateConfig(CardBlockchainRateConfigAddEntity entity) throws ServiceException;
    /**
     * 修改区块链汇率配置
     */
    BaseResultDto updateCardBlockchainRateConfig(CardBlockchainRateConfigUpdateEntity entity) throws ServiceException;
    /**
     * 批量删除区块链汇率配置
     */
    BaseResultDto deleteCardBlockchainRateConfig(BaseDeleteEntities entity) throws ServiceException;

    BigDecimal getRate(String currency, String convertCurrency, Integer type) throws ServiceException;

    BigDecimal getRateAmount(String currency, String transformCurrency, Integer type, BigDecimal amount) throws ServiceException;
}
