package com.crm.manager.service.ucard;

import com.crm.rely.backend.core.dto.base.BaseReportResultDto;
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.GlobalOrderDto;
import com.crm.rely.backend.core.dto.ucard.GlobalOrderSumDto;
import com.crm.rely.backend.core.dto.wasabi.WasabiAvailableCurrenciesListDto;
import com.crm.rely.backend.core.entity.base.BaseEntity;
import com.crm.rely.backend.core.entity.ucard.*;
import com.crm.rely.backend.core.entity.wasabi.WasabiTransactionSubmitRfiEntity;
import com.crm.rely.backend.exception.ServiceException;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(name = "UCARD-SERVICE", path = "/ucard/global/manager")
public interface UcardGlobalFeignService {

    /**
     * 支持的币种列表
     */
    @PostMapping("/currencies/dropdown")
    BaseResultDto getCurrenciesDropdown(GlobalCurrenciesDropdownEntity entity) throws ServiceException;

    /**
     * 币种字段和可选值列表
     */
    @PostMapping("/currencies/field/list")
    BaseResultDto getCurrenciesFieldList(GlobalCurrenciesFieldListEntity entity) throws ServiceException;

    /**
     * 同步币种信息
     */
    @PostMapping("/currencies/save")
    BaseResultDto saveAvailableCurrencies() throws ServiceException;

    /**
     * 币种分页列表
     */
    @PostMapping("/currencies/list")
    ResultWithPagerDto<WasabiAvailableCurrenciesListDto> getCurrenciesPageList(GlobalCurrenciesPageListEntity entity) throws ServiceException;

    /**
     * 创建交易订单
     */
    @PostMapping("/create/order")
    BaseResultDto globalCreateOrder(GlobalCreateOrderEntity entity) throws Exception;

    /**
     * 速汇订单分页列表
     */
    @PostMapping("/order/page/list")
    BaseReportResultDto<List<GlobalOrderDto>, GlobalOrderSumDto> globalOrderPageList(GlobalOrderPageEntity entity) throws Exception;

    /**
     * 币种配置更改
     */
    @PostMapping("/currencies/config")
    BaseResultDto globalCurrenciesConfig(GlobalCurrenciesConfigEntity entity) throws ServiceException;

    /**
     * 查询汇率和手续费率
     */
    @PostMapping("/query/exchange/rate")
    BaseResultDto queryExchangeRate(GlobalQueryExchangeRateEntity entity) throws ServiceException;

    /**
     * 查询支持的城市列表
     */
    @PostMapping("/query/bank/cities")
    BaseResultDto queryBankCities(CardBankCitiesEntity entity) throws ServiceException;

    /**
     * 查询币种全局配置
     */
    @PostMapping("/query/currencies/config")
    BaseResultDto getCurrenciesGlobalConfig() throws ServiceException;

    /**
     * 取消交易订单
     */
    @PostMapping("/cancel/order")
    BaseResultDto globalCancelOrder(GlobalCancelOrderEntity entity) throws Exception;

    /**
     * 补充资料
     */
    @PostMapping("/supplementary/data")
    BaseResultDto supplementaryData(WasabiTransactionSubmitRfiEntity entity) throws ServiceException;

    /**
     * 速汇订单列表导出
     */
    @PostMapping("/order/list/export")
    BaseResultDto<List<GlobalOrderDto>> globalOrderListExport(GlobalOrderPageEntity entity) throws ServiceException;

    /**
     * 速汇订单审批
     */
    @PostMapping("/order/approve")
    BaseResultDto globalOrderApprove(GlobalOrderApproveEntity entity) throws Exception;

    /**
     * 查询最新汇率
     */
    @PostMapping("/query/latest/exchange/rate")
    BaseResultDto getExchangeRateByCurrency(GlobalQueryExchangeRateEntity entity) throws ServiceException;

    /**
     * 查询速汇订单详情
     */
    @PostMapping("/order/details")
    BaseResultDto queryGlobalOrderDetails(BaseEntity entity) throws ServiceException;

    /**
     * 获取收款用户列表
     */
    @PostMapping("/receiver/user/list")
    BaseResultDto getGlobalReceiverUserList(GlobalReceiverUserEntity entity) throws ServiceException;

    /**
     * 删除收款用户
     */
    @PostMapping("/receiver/user/delete")
    BaseResultDto deleteGlobalReceiverUser(BaseEntity entity) throws ServiceException;

    /**
     * 币种所有字段名称
     */
    @PostMapping("/field/params")
    BaseResultDto getGlobalFieldParams() throws ServiceException;

}
