package com.seer.teach.mall.api;

import com.seer.teach.mall.api.req.AfterSaleRefundNotifyReq;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = ApiConstants.SERVER_NAME, contextId = "afterSaleApi", path = "/seer/mall")
public interface MallAfterSaleApi {

    /**
     * 售后单退款成功的回调
     *
     * @param afterSaleRefundNotifyReq 售后单状态更新参数
     * @return 修改结果
     */
    @PutMapping("/internal/after-sale/refund-success/notify")
    boolean orderRefundAfterSuccessNotify(@RequestBody AfterSaleRefundNotifyReq afterSaleRefundNotifyReq);
    
    /**
     * 售后单退款失败的回调
     *
     * @param afterSaleRefundNotifyReq 售后单状态更新参数
     * @return 修改结果
     */
    @PutMapping("/internal/after-sale/refund-fail/notify")
    boolean orderRefundAfterFailNotify(@RequestBody AfterSaleRefundNotifyReq afterSaleRefundNotifyReq);
}