package com.ruoyi.goods.api.feignClient;
|
|
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.core.web.page.PageInfo;
|
import com.ruoyi.goods.api.domain.TGoods;
|
import com.ruoyi.goods.api.domain.TGoodsType;
|
import com.ruoyi.goods.api.factory.GoodsFallbackFactory;
|
import com.ruoyi.goods.api.model.*;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import java.util.List;
|
|
@FeignClient(contextId = "goodsClient", value = ServiceNameConstants.GOODS_SERVICE, fallbackFactory = GoodsFallbackFactory.class)
|
public interface GoodsClient {
|
@PostMapping("/base/goods/confirm1")
|
R getGoodsInfo1(@RequestBody OrderDTO dto);
|
@PostMapping("/base/goods/getOrderInfo/{id}")
|
R<TOrderVO> getOrderInfo(@PathVariable("id")Integer id);
|
@PostMapping("/base/goods/listAll1")
|
R<PageInfo<TOrderVO>> listAll1(@RequestBody OrderQuery query);
|
@PostMapping("/base/goods/listType")
|
R<PageInfo<TGoodsType>> listType(@RequestBody GoodsTypeQuery query);
|
|
@PostMapping("/base/goods/addGoodsType")
|
R addGoodsType(@RequestBody TGoodsType dto);
|
@PostMapping("/base/goods/updateGoodsType")
|
R updateGoodsType(@RequestBody TGoodsType dto);
|
|
@PostMapping("/base/goods/deleteGoodsType/{id}")
|
R deleteGoodsType(@PathVariable("id") Integer id);
|
@PostMapping("/base/goods/listAll")
|
R<PageInfo<TGoods>> listAll(@RequestBody GoodsTypeQuery query);
|
@PostMapping("/base/goods/addGoods")
|
R addGoods(@RequestBody TGoods dto);
|
|
@PostMapping("/base/goods/deleteGoods/{id}")
|
R deleteGoods(@PathVariable("id") Integer id);
|
|
@PostMapping("/base/goods/updateGoods")
|
R updateGoods(@RequestBody TGoods dto);
|
|
@PostMapping("/base/goods/getGoodsInfo/{id}")
|
R<TGoodsVO> getGoodsInfo(@PathVariable("id") Integer id);
|
|
@PostMapping("/base/goods/getGoodsTypeList")
|
R<List<TGoodsType>> getGoodsInfo();
|
|
/**
|
* 可兑换商品推荐
|
*
|
* @return 推荐商品信息
|
*/
|
@GetMapping("/goodRecommend")
|
@ApiOperation(value = "可兑换商品推荐", tags = {"可兑换商品推荐"})
|
R<List<TGoodsVO>> goodRecommend();
|
|
}
|