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

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.yuchen.saas.payment.api.dto.order.OrderRefundAppealApplyDTO;
import com.yuchen.saas.payment.api.dto.order.OrderRefundAppealCancleDTO;
import io.swagger.annotations.ApiOperation;
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.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(
        value = AppNameConstant.SAAS_PAYMENT,
        fallbackFactory = OrderAppealFeignFallback.class
)
public interface OrderAppealFeign {

    /**
     * 售后申诉申请
     * @param applyDto 售后申诉申请Dto
     * @return TRUE/FALSE
     */
    @PostMapping("/orderRefundAppeal/appealApply")
    R<Boolean> appealApply(@RequestBody @Validated OrderRefundAppealApplyDTO applyDto);

    /**
     * 售后申诉取消
     * @param cancleDTO 售后申诉取消Dto
     * @return TRUE/FALSE
     */
    @PostMapping("/orderRefundAppeal//appealCancle")
    R<Boolean> appealCancle(@RequestBody @Validated OrderRefundAppealCancleDTO cancleDTO);

}
