package com.sckw.payment.api.feign;

import com.sckw.core.web.response.BaseResult;
import com.sckw.payment.api.model.feign.WalletPrepaidDto;
import com.sckw.payment.api.model.feign.WalletPayableDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

@FeignClient(name = "sckw-ng-payment-new",contextId = "paymentFeignService")
public interface PaymentFeignService {

    @GetMapping("/walletPrepaid/queryPrepaidBalance")
    BaseResult<BigDecimal> queryPrepaidBalance(@RequestParam("supEntId") Long supEntId);

    /**
     * 初始化预付清单
     */
    @PostMapping("/walletPrepaid/initPrepaidBalance")
    BaseResult<Object> initPrepaidBalance(@RequestBody WalletPrepaidDto prepaidDto);

    /**
     * 预付清单冻结、解冻、消费接口
     */
    @PostMapping("/walletPrepaid/updatePrepaidBalance")
    BaseResult<Object> updatePrepaidBalance(@RequestBody WalletPrepaidDto prepaidDto);

    /**
     * 初始化运费清单
     */
    @PostMapping("/walletPayable/initPayable")
    BaseResult<Object> initPayable(@RequestBody WalletPayableDto payableAddDto);

    /**
     * 运费清单冻结、解冻、消费接口
     */
    @PostMapping("/walletPayable/updatePayable")
    BaseResult<Object> updatePayable(@RequestBody @Validated WalletPayableDto payableUpdateDto);


}
