puzhibing
2025-01-08 b22df417e0bc423c788b013feaad686531d69eed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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);
}