package com.tofly.api;

import com.tofly.common.core.entity.ResultRespone;
import com.tofly.pojo.CertificationOrderDto;
import com.tofly.pojo.ReportOrderInfoVo;
import org.springframework.cloud.openfeign.FeignClient;
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 javax.validation.Valid;
import java.util.List;

@FeignClient(name = "tofly-xrtyqualitycontrol",contextId="CertificationOrderClient")
public interface CertificationOrderClient {

    @PostMapping("/certificationOrder/orderSave")
    ResultRespone saveCertificationExternalOrder(@Valid @RequestBody CertificationOrderDto dto);

    @GetMapping("/certificationOrder/order")
    ResultRespone<List<ReportOrderInfoVo>> getOrder(@RequestParam("id") Long id, @RequestParam("type") Long type);

}
