package com.ruoyi.order.feignClient;
|
|
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.order.factory.OrderClientFallbackFactory;
|
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
/**
|
* @author zhibing.pu
|
* @date 2025/1/7 14:37
|
*/
|
@FeignClient(contextId = "OrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = OrderClientFallbackFactory.class)
|
public interface OrderClient {
|
|
|
/**
|
* 获取商品销售数量
|
* @param goodsId
|
* @return
|
*/
|
@PostMapping("/order/getGoodsSaleNum")
|
R<Integer> getGoodsSaleNum(@RequestParam("goodsId") Integer goodsId, @RequestParam("type") Integer type);
|
|
|
/**
|
* 获取门店销售订单数量
|
* @param shopId 门店id
|
* @param type 1:服务订单,2:单品订单
|
* @return
|
*/
|
@PostMapping("/order/getShopSaleNum")
|
R<Integer> getShopSaleNum(@RequestParam("shopId") Integer shopId, @RequestParam("type") Integer type);
|
}
|