package com.crm.manager.service.ucard;

import com.crm.rely.backend.core.dto.base.*;
import com.crm.rely.backend.core.dto.ucard.*;
import com.crm.rely.backend.core.dto.ucard.vaultody.VaultodyDepositAddressDto;
import com.crm.rely.backend.core.dto.wasabi.*;
import com.crm.rely.backend.core.entity.base.*;
import com.crm.rely.backend.core.entity.ucard.*;
import com.crm.rely.backend.core.entity.ucard.crypto.currency.vaultody.VaultodyDepositAddressPageEntity;
import com.crm.rely.backend.core.entity.ucard.crypto.currency.vaultody.VaultodyResetDepositAddressEntity;
import com.crm.rely.backend.core.entity.wasabi.*;
import com.crm.rely.backend.exception.ServiceException;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

@FeignClient(name = "UCARD-SERVICE", path = "/wasabi/manager")
public interface WasabiCardFeignService {

    /**
     * 获取卡片类型列表
     */
    @PostMapping("/card/types/page")
    ResultWithPagerDto<CardTypeDto> getCardTypePageList(CardTypePageEntity entity) throws ServiceException;

    /**
     * 更新基本信息
     */
    @PostMapping("/card/types")
    BaseResultDto getCardTypes() throws ServiceException;

    /**
     * 商户用户分页列表
     */
    @PostMapping("/merchant/user/page")
    ResultWithPagerDto<MerchantUserDto> getMerchantUserPageList(MerchantUserPageEntity entity) throws ServiceException;

    /**
     * 商户用户注册
     */
    @PostMapping("/merchant/user/register")
    BaseResultDto registerMerchantUser(CardMerchantUserEntity request) throws ServiceException;

    /**
     * 更新用户邮寄地址
     */
    @PostMapping("/merchant/user/address/update")
    BaseResultDto updateUserMailingAddress(WasabiSaveUserMailingAddressEntity request) throws ServiceException;

    /**
     * 更新商户用户信息
     */
    @PostMapping("/merchant/user/update")
    BaseResultDto updateMerchantUser(CardMerchantUserEntity request) throws ServiceException;

    /**
     * 获取kyc认证分页列表
     */
    @PostMapping("/merchant/kyc/page")
    ResultWithPagerDto<CardKycStatusDto> getKycPageList(CardKycStatusPageEntity entity) throws ServiceException;

    /**
     * 手动审核KYC认证
     */
    @PostMapping("/merchant/kyc/manual/submit")
    BaseResultDto manualSubmitKyc(CardKycApproveEntity request) throws ServiceException;

    /**
     * 申请开卡
     */
    @PostMapping("/card/apply")
    BaseResultDto applyCard(CardApplyEntity request) throws ServiceException;

    /**
     * 开卡审批
     */
    @PostMapping("/card/apply/approve")
    BaseResultDto cardApplyApprove(CardApplyApproveEntity request) throws Exception;

    /**
     * 查询开卡进度
     */
    @PostMapping("/card/apply/progress")
    BaseResultDto<CardApplyProgressDto> queryApplyProgress(CardApplyProgressEntity request) throws ServiceException;

    /**
     * 获取卡片申请列表
     */
    @PostMapping("/card/apply/page")
    ResultWithPagerDto<CardApplyDto> getCardApplyPageList(CardApplyPageEntity entity) throws ServiceException;

    /**
     * 获取卡片申请详情
     */
    @PostMapping("/card/apply/details")
    BaseResultDto cardApplyDetails(BaseEntity entity) throws ServiceException;

    /**
     * 获取卡片列表
     */
    @PostMapping("/card/page")
    ResultWithPagerDto<UcardCardDto> getCardPageList(CardPageEntity entity) throws ServiceException;

    /**
     * 银行卡激活
     */
    @PostMapping("/card/activate")
    BaseResultDto<WasabiActiveCardDto> activateCard(WasabiActiveCardEntity request) throws ServiceException;

    /**
     * 银行卡充值
     */
    @PostMapping("/card/recharge")
    BaseResultDto<WasabiDepositDto> rechargeCard(WasabiBalanceEntity request) throws ServiceException;

    /**
     * 银行卡充值审批
     */
    @PostMapping("/card/recharge/approve")
    BaseResultDto rechargeCardApprove(WasabiDepositApproveEntity request) throws Exception;

    /**
     * 查询用户钱包余额
     */
    @PostMapping("/card/wallet/balance")
    BaseResultDto<WalletBalanceDto> walletBalance(WalletBalanceEntity request) throws ServiceException;

    /**
     * 获取用户钱包记录列表
     */
    @PostMapping("/card/wallet/record/page")
    ResultWithPagerDto<CardWalletRecordDto> getCardWalletRecordPageList(CardWalletRecordPageEntity entity) throws ServiceException;

    /**
     * 查询充值订单
     */
    @PostMapping("/card/recharge/order")
    BaseResultDto<CardRechargeOrderDto> queryRechargeOrder(CardRechargeOrderQueryEntity request) throws ServiceException;

    /**
     * 查询充值记录
     */
    @PostMapping("/card/recharge/records")
    BaseResultDto<CardRechargeOrderListDto> queryRechargeRecords(WasabiTransactionEntity request) throws ServiceException;

    /**
     * 充值记录分页查询
     */
    @PostMapping("/card/recharge/page")
    BaseReportResultDto<List<CardRechargeOrderDto>, CardRechargeOrderSumDto> queryRechargePageList(CardRechargePageEntity entity) throws ServiceException;

    /**
     * 查询卡片余额
     */
    @PostMapping("/card/balance")
    BaseResultDto<WasabiBalanceInfoDto> queryCardBalance(WasabiBalanceInfoEntity request) throws ServiceException;

    /**
     * 调整余额
     */
    @PostMapping("/card/wallet/balance/update")
    BaseResultDto updateBalance(WasabiUpdateBalanceEntity request) throws ServiceException;

    /**
     * 找回密码
     */
    @PostMapping("/card/password/reset")
    BaseResultDto resetPassword(WasabiUpdatePinEntity request) throws ServiceException;

    /**
     * 查询交易记录分页列表
     */
    @PostMapping("/card/transac/page")
    ResultWithPagerDto<CardTransacOrderDto> getTransactionPageList(CardTransacOrderPageEntity request) throws ServiceException;

    /**
     * 冻结卡片
     */
    @PostMapping("/card/freeze")
    BaseResultDto freezeCard(WasabiFreezeAndUnfreezeEntity request) throws ServiceException;

    /**
     * 解冻卡片
     */
    @PostMapping("/card/unfreeze")
    BaseResultDto unfreezeCard(WasabiFreezeAndUnfreezeEntity request) throws ServiceException;

    /**
     * 查询国家和城市
     */
    @PostMapping("/card/country")
    BaseResultDto getCardCountry(CardCountryEntity request) throws ServiceException;

    /**
     * 查询职业信息
     */
    @PostMapping("/card/occupation/list")
    BaseResultDto<List<WasabiOccupationsDto>> getOccupationList() throws ServiceException;

    /**
     * 查询激活码
     */
    @PostMapping("/get/activation/code")
    BaseResultDto<WasabiThird3dsTransactionDto> getActivationCode(WasabiThird3dsTransactionEntity entity) throws ServiceException;

    /**
     * 卡信息刷新
     */
    @PostMapping("/card/info/refresh")
    BaseResultDto refreshCardInfo(CardInfoRefreshEntity entity) throws ServiceException;

    /**
     * 卡权限分页列表
     */
    @PostMapping("/card/permission/page")
    ResultWithPagerDto<CardPermissionDto> queryPermissionPageList(CardPermissionPageEntity entity) throws ServiceException;

    /**
     * 新增卡权限
     */
    @PostMapping("/card/permission/add")
    BaseResultDto permissionAdd(CardPermissionAddEntity entity) throws ServiceException;

    /**
     * 更新卡权限
     */
    @PostMapping("/card/permission/update")
    BaseResultDto permissionUpdate(CardPermissionUpdateEntity entity) throws ServiceException;

    /**
     * 删除卡权限
     */
    @PostMapping("/card/permission/delete")
    BaseResultDto permissionDelete(CardPermissionDeleteEntity entity) throws ServiceException;


    /**
     * 操作记录分页列表
     */
    @PostMapping("/card/operate/page")
    ResultWithPagerDto<CardOperateDto> queryOperatePageList(CardOperatePageEntity entity) throws ServiceException;

    /**
     * kyc认证详情
     */
    @PostMapping("/kyc/status/single")
    BaseResultDto kycStatusSingle(SingleLongEntity entity) throws ServiceException;

    /**
     * 重新充值默认开卡金额
     */
    @PostMapping("/recharge/default/amount")
    BaseResultDto rechargeDefaultAmount(CardRechargeDefaultAmountEntity entity) throws Exception;

    /**
     * 校验实体卡卡号是否使用过
     */
    @PostMapping("/card/number/verify")
    BaseResultDto cardNumberVerify(CardNumberVerifyEntity entity) throws ServiceException;

    /**
     * 手动上传证件照
     */
    @PostMapping("/card/photo/manually")
    BaseResultDto uploadCardPhotoManually(CardPhotoUploadManuallyEntity entity) throws ServiceException;

    /**
     * 用户列表导出
     */
    @PostMapping("/merchant/user/list/export")
    BaseResultDto<List<MerchantUserDto>> merchantUserListExport(MerchantUserPageEntity entity) throws ServiceException;

    /**
     * kyc认证列表导出
     */
    @PostMapping("/merchant/kyc/list/export")
    BaseResultDto<List<CardKycStatusDto>> merchantKycListExport(CardKycStatusPageEntity entity) throws ServiceException;

    /**
     * 申请列表导出
     */
    @PostMapping("/card/apply/list/export")
    BaseResultDto<List<CardApplyDto>> cardApplyListExport(CardApplyPageEntity entity) throws ServiceException;

    /**
     * 卡列表导出
     */
    @PostMapping("/card/list/export")
    BaseResultDto<List<UcardCardDto>> cardListExport(CardPageEntity entity) throws ServiceException;

    /**
     * 卡交易记录导出
     */
    @PostMapping("/card/transac/record/export")
    BaseResultDto<List<CardTransacOrderDto>> cardTransacRecordExport(CardTransacOrderPageEntity entity) throws ServiceException;

    /**
     * 钱包余额记录导出
     */
    @PostMapping("/card/wallet/record/export")
    BaseResultDto<List<CardWalletRecordDto>> cardWalletRecordExport(CardWalletRecordPageEntity entity) throws ServiceException;

    /**
     * 操作记录导出
     */
    @PostMapping("/card/operate/record/export")
    BaseResultDto<List<CardOperateDto>> cardOperateRecordExport(CardOperatePageEntity entity) throws ServiceException;

    /**
     * 充值记录列表导出
     */
    @PostMapping("/card/recharge/list/export")
    BaseResultDto<List<CardRechargeOrderDto>> cardRechargeListExport(CardRechargePageEntity entity) throws ServiceException;

    /**
     * 卡扣款
     */
    @PostMapping("/card/withdraw")
    BaseResultDto cardWithdraw(WasabiWithdrawEntity request) throws ServiceException;

    /**
     * 更新卡类型配置
     */
    @PostMapping("/card/type/config/update")
    BaseResultDto updateCardTypeConfig(CardTypeConfigUpdateEntity entity) throws ServiceException;

    /**
     * 证件类型配置列表
     */
    @PostMapping("/card/id/type/config/list")
    ResultWithPagerDto<CardIdTypeConfigDto> getCardIdTypeConfigList(CardIdTypeConfigPageEntity entity) throws ServiceException;

    /**
     * 批量新增证件类型配置
     */
    @PostMapping("/card/id/type/config/add")
    BaseResultDto batchAddCardIdTypeConfig(List<CardIdTypeConfigAddEntity> entitys) throws ServiceException;

    /**
     * 修改证件类型配置
     */
    @PostMapping("/card/id/type/config/update")
    BaseResultDto updateCardIdTypeConfig(CardIdTypeConfigUpdateEntity entity) throws ServiceException;

    /**
     * 删除证件类型配置
     */
    @PostMapping("/card/id/type/config/delete")
    BaseResultDto deleteCardIdTypeConfig(BaseDeleteEntities entity) throws ServiceException;

    /**
     * 查询cvv码
     */
    @PostMapping("/card/query/cvv")
    BaseResultDto cardQueryCvv(CardVerifyGoogleCodeEntity entity) throws ServiceException;

    /**
     * 根据卡号查询卡信息
     */
    @PostMapping("/card/info/query")
    BaseResultDto queryCardInfoByCardNumber(CardInfoQueryEntity entity) throws ServiceException;

    /**
     * 导入卡号
     */
    @PostMapping("/card/number/import")
    BaseResultDto cardNumberImport(List<CardNumberAddEntity> entityList) throws ServiceException;

    /**
     * 卡号列表
     */
    @PostMapping("/card/number/list")
    ResultWithPagerDto<CardNumberDto> queryCardNumberList(CardNumberPageEntity entity) throws ServiceException;

    /**
     * 修改卡号状态
     */
    @PostMapping("/card/number/update/status")
    BaseResultDto saveCardNumberStatus(CardNumberUpdateEntity entity) throws ServiceException;

    /**
     * 卡号下拉列表
     */
    @PostMapping("/card/number/dropdown")
    BaseResultDto queryCardNumberDropdown(CardNumberPageEntity entity) throws ServiceException;

    /**
     * 删除实体卡卡号
     */
    @PostMapping("/card/number/delete")
    BaseResultDto deleteCardNumber(BaseDeleteEntities entity) throws ServiceException;

    /**
     * 添加文件记录
     */
    @PostMapping("/card/file/add")
    BaseResultDto cardFileAdd(CardFileAddEntity entity) throws ServiceException;

    /**
     * 校验文件
     */
    @PostMapping(value = "/validated/file", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE}, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    void validatedFile(@RequestPart(value = "file") MultipartFile file) throws ServiceException;

    /**
     * 修改文件
     */
    @PostMapping("/card/file/update")
    BaseResultDto cardFileUpdate(CardFileUpdateEntity entity) throws ServiceException;

    /**
     * 删除文件
     */
    @PostMapping("/card/file/delete")
    BaseResultDto cardFileDelete(BaseDeleteEntities entity) throws ServiceException;

    /**
     * 文件分页列表
     */
    @PostMapping("/card/file/search/list")
    ResultWithPagerDto<CardFileDto> cardFileSearchList(CardFilePageEntity entity) throws ServiceException;

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

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

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

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

    /**
     * 查询账户信息
     */
    @PostMapping("/card/account/dropdown")
    BaseResultDto cardAccountDropdown(CardAccountDropdownEntity entity) throws ServiceException;

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

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

    /**
     * 查询已认证用户列表
     */
    @PostMapping("/card/query/user/list")
    BaseResultDto queryUcardUserList() throws ServiceException;

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

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

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

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

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

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

    /**
     * 配置用户汇率
     */
    @PostMapping("/merchant/user/rate/config")
    BaseResultDto cardUserRateConfig(CardUserRateConfigEntity request) throws ServiceException;

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

    /**
     * 加密货币交易记录导出
     */
    @PostMapping("/encrypted/wallet/transaction/list/export")
    BaseResultDto<List<EncryptedWalletTransactionDto>> encryptedWalletTransactionListExport(EncryptedWalletTransactionPageEntity entity) throws ServiceException;

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

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

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

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

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

    /**
     * 区块链配置列表
     */
    @PostMapping("/card/blockchain/config/page")
    ResultWithPagerDto<CardBlockchainConfigDto> getCardBlockchainConfigPageList(CardBlockchainConfigPageEntity entity) throws ServiceException;

    /**
     * 新增区块链配置
     */
    @PostMapping("/card/blockchain/config/add")
    BaseResultDto addCardBlockchainConfig(CardBlockchainConfigAddEntity entity) throws ServiceException;

    /**
     * 修改区块链配置
     */
    @PostMapping("/card/blockchain/config/update")
    BaseResultDto updateCardBlockchainConfig(CardBlockchainConfigUpdateEntity entity) throws ServiceException;

    /**
     * 删除区块链配置
     */
    @PostMapping("/card/blockchain/config/delete")
    BaseResultDto deleteCardBlockchainConfig(BaseDeleteEntities entity) throws ServiceException;

    /**
     * 区块链下拉列表
     */
    @PostMapping("/card/blockchain/dropdown")
    BaseResultDto getCardBlockchainDropdown() throws ServiceException;

    /**
     * 区块链汇率配置列表
     */
    @PostMapping("/card/blockchain/rate/config/page")
    ResultWithPagerDto<CardBlockchainRateConfigDto> getCardBlockchainRateConfigPageList(CardBlockchainRateConfigPageEntity entity) throws ServiceException;

    /**
     * 新增区块链汇率配置
     */
    @PostMapping("/card/blockchain/rate/config/add")
    BaseResultDto addCardBlockchainRateConfig(CardBlockchainRateConfigAddEntity entity) throws ServiceException;

    /**
     * 修改区块链汇率配置
     */
    @PostMapping("/card/blockchain/rate/config/update")
    BaseResultDto updateCardBlockchainRateConfig(CardBlockchainRateConfigUpdateEntity entity) throws ServiceException;

    /**
     * 删除区块链汇率配置
     */
    @PostMapping("/card/blockchain/rate/config/delete")
    BaseResultDto deleteCardBlockchainRateConfig(BaseDeleteEntities entity) throws ServiceException;

    /**
     * 钱包地址分页列表
     */
    @PostMapping("/card/deposit/address/page")
    ResultWithPagerDto<VaultodyDepositAddressDto> getDepositAddressPage(VaultodyDepositAddressPageEntity entity) throws ServiceException;

    /**
     * 重置钱包地址
     */
    @PostMapping("/card/deposit/address/reset")
    BaseResultDto resetDepositAddress(VaultodyResetDepositAddressEntity entity) throws ServiceException;

    /**
     * 加密货币交易分页列表
     */
    @PostMapping("/encrypted/wallet/transaction/page")
    ResultWithPagerDto<EncryptedWalletTransactionDto> getEncryptedWalletTransactionPage(EncryptedWalletTransactionPageEntity entity) throws ServiceException;

    /**
     * 销卡
     */
    @PostMapping("/card/cancel")
    BaseResultDto cardCancel(WasabiCancelEntity request) throws ServiceException;

    /**
     * 卡扣款分页列表
     */
    @PostMapping("/card/withdraw/page")
    ResultWithPagerDto<CardWithdrawDto> queryCardWithdrawPage(CardWithdrawPageEntity entity) throws ServiceException;

    /**
     * 卡3ds分页列表
     */
    @PostMapping("/card/3ds/transaction/page")
    ResultWithPagerDto<Card3dsTransactionDto> queryCard3dsTransactionPage(Card3dsTransactionPageEntity entity) throws ServiceException;

    /**
     * 卡扣款列表导出
     */
    @PostMapping("/card/withdraw/list/export")
    BaseResultDto<List<CardWithdrawDto>> cardWithdrawListExport(CardWithdrawPageEntity entity) throws ServiceException;

    /**
     * 3ds列表导出
     */
    @PostMapping("/card/3ds/transaction/list/export")
    BaseResultDto<List<Card3dsTransactionDto>> card3dsTransactionListExport(Card3dsTransactionPageEntity entity) throws ServiceException;
}
