package com.miaxis.feign.service;

import com.miaxis.common.config.FeignConfig;
import com.miaxis.feign.service.fallback.CarFallBackService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author wwl
 * @version 1.0
 * @date 2021/5/21 10:13
 */
@FeignClient(name="carService",
        url = "http://tool.bitefu.net",
        fallbackFactory = CarFallBackService.class,configuration = FeignConfig.class)
@Component
public interface ICarService {

    /**
     *
     * @param type brand
     * @param from 数据源
     * @param pagesize  数据源的量不一样 300调取所有
     * @return
     */
    @GetMapping(value = "/car")
    String car(@RequestParam("type") String type,
               @RequestParam("from") String from,
               @RequestParam("pagesize") String pagesize);

}
