ProductFeignClient.java 1 KB
package com.glsx.api.remote;

import java.util.List;
import com.alibaba.fastjson.JSONObject;
import com.glsx.api.pojo.request.ProductReq;
import com.glsx.api.pojo.response.ProductResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>Description:
 * <p>Project: chejia-smart
 *
 * @author wbh
 * @date 2021-03-16
 */
@FeignClient(name = "${feign.server.name}",url = "${feign.server.url}")
public interface ProductFeignClient {

    @ResponseBody
    @RequestMapping(value = "/product/getListByCondition", method = {RequestMethod.POST})
    List<ProductResp> getListByCondition(@RequestBody ProductReq req);

    @RequestMapping(value = "/product/getProductAndCategory", method = {RequestMethod.GET})
    @ResponseBody
    JSONObject getProductAndCategory();
}