GoodsClient.java 900 B

1234567891011121314151617181920212223242526272829
  1. package fangxianyu.innerApi.goods;
  2. import io.github.nnkwrik.common.dto.Response;
  3. import io.github.nnkwrik.common.dto.SimpleGoods;
  4. import org.springframework.cloud.openfeign.FeignClient;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.PathVariable;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RequestParam;
  9. import java.util.List;
  10. import java.util.Map;
  11. /**
  12. * @author nnkwrik
  13. * @date 18/12/07 21:08
  14. */
  15. @FeignClient(name = "goods-service")
  16. @RequestMapping("/goods-service")
  17. public interface GoodsClient {
  18. @GetMapping("/simpleGoods/{goodsId}")
  19. Response<SimpleGoods> getSimpleGoods(@PathVariable("goodsId") Integer goodsId);
  20. @GetMapping("/simpleGoodsList")
  21. Response<Map<Integer, SimpleGoods>> getSimpleGoodsList(@RequestParam List<Integer> goodsIdList);
  22. }