package com.yuchen.saas.payment.api.feign.setting;

import com.yuchen.saas.payment.api.entity.setting.SaasPaymentApplyWalletConfig;
import com.yuchen.saas.payment.api.entity.setting.SaasPaymentSiteConfig;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(
        value = AppNameConstant.SAAS_PAYMENT,
        fallbackFactory = PaymentSettingFeignFallBack.class
)
public interface PaymentSettingFeign {

    /**
     * 查询场站支付配置列表
     */
    @GetMapping("/paymentSiteConfig/getPaymentSiteConfigList/{siteId}/{collectFeeModel}")
    R<List<SaasPaymentSiteConfig>> getPaymentSiteConfigList(@PathVariable Long siteId, @PathVariable String collectFeeModel);

    /**
     * 根据场站id列表查询场站支付配置列表
     */
    @PostMapping("/paymentSiteConfig/getPaymentSiteConfigListBySiteIdList")
    R<List<SaasPaymentSiteConfig>> getPaymentSiteConfigListBySiteIdList(@RequestBody List<Long> siteIdList);

    /**
     * 查询应用钱包支付配置列表
     */
    @GetMapping("/applyWalletConfig/getPaymentApplyWalletConfigList/{applyId}")
    R<List<SaasPaymentApplyWalletConfig>> getPaymentApplyWalletConfigList(@PathVariable Long applyId);

}