package com.yc.ship.module.trade.controller.app.order;

import com.yc.ship.framework.common.pojo.CommonResult;
import com.yc.ship.framework.operatelog.core.annotations.OperateLog;
import com.yc.ship.module.trade.controller.admin.order.vo.rule.RefundAuditNotifyReqVO;
import com.yc.ship.module.trade.service.supplier.TradeStandardSupplierService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

import static com.yc.ship.framework.operatelog.core.enums.OperateTypeEnum.API;

/**
 * &#064;Description ：标准的供应商接入Controller
 * &#064;Author ：qsl
 * &#064;Date ：2025/8/15 20:52
 */
@Tag(name = "标准的供应商接入Controllerr")
@RestController
@RequestMapping("/trade/standard/supplier")
@Validated
@Slf4j
public class TradeStandardSupplierController {

    @Resource
    private TradeStandardSupplierService tradeStandardSupplierService;

    @PostMapping("/refundAuditNotify")
    @Operation(summary = "用于接收供应商退款审核结果通知,对方系统对接我们时采用")
    @OperateLog(type = API)
    public CommonResult<?> standardRefundAuditNotify(@RequestBody RefundAuditNotifyReqVO refundAuditNotifyReqVO){

        tradeStandardSupplierService.handleSupplierRefundAuditNotify(refundAuditNotifyReqVO);
        return CommonResult.success(null);
    }

}
