package cn.sikey.hmd.api.hmd;


import cn.sikey.framework.common.pojo.CommonResult;
import cn.sikey.hmd.api.hmd.vo.payments.PaymentsReqVO;
import cn.sikey.hmd.api.hmd.vo.payments.PaymentsRespVO;
import cn.sikey.hmd.enums.ApiConstants;
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;

/**
 * @Author: qin
 * @Date: 2025/4/25
 * @Description: 付款记录
 */
@FeignClient(name = ApiConstants.NAME)
public interface PaymentApi {

    String PREFIX = ApiConstants.PREFIX;

    @PostMapping(PREFIX + "/savePayments")
    CommonResult<Void> savePayments(@RequestBody @Validated PaymentsReqVO paymentsReqVO);

    @PostMapping(PREFIX + "/updatePayments")
    CommonResult<Void> updatePayments(@RequestBody @Validated PaymentsReqVO paymentsReqVO);

    @GetMapping(PREFIX + "/queryPayments")
    CommonResult<PaymentsRespVO> queryPayments(@RequestParam Long orderId);
}
