package com.njcn.harmonic.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.harmonic.api.fallback.RStatLimitRateDFeignClientFallbackFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@FeignClient(
        value = ServerInfo.HARMONIC,
        path = "/exportmodel",
        fallbackFactory = RStatLimitRateDFeignClientFallbackFactory.class,
        contextId = "exportmodel")
public interface ReportFeignClient {

    @PostMapping(value ="/exportModelJB",consumes =  MediaType.MULTIPART_FORM_DATA_VALUE)
    HttpResult<String> exportModelJB(
            @RequestParam(value ="startTime",required = false) String startTime,
            @RequestParam(value ="endTime",required = false)  String endTime,
            @RequestParam(value ="type",required = false) Integer type,
            @RequestParam(value ="lineIndex",required = false)  String lineIndex,
            @RequestParam(value ="name",required = false)  String name,
            @RequestParam(value ="reportNumber",required = false) String reportNumber,
            @RequestParam(value ="crmName",required = false) String crmName,
            @RequestParam(value = "isUrl",required = false)  Boolean isUrl,
            @RequestPart(value ="file",required = false)   MultipartFile file) throws IOException;

}
