Pu Zhibing
2025-03-26 7f26677ab7f9b83697370fa142dd1686cdf4082a
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package com.ruoyi.order.feignClient;
 
 
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.order.factory.RemoteOrderGoodsFallbackFactory;
import com.ruoyi.order.model.Order;
import com.ruoyi.order.model.OrderGood;
import com.ruoyi.order.vo.Price;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
 
import java.util.List;
import java.util.Set;
 
@FeignClient(contextId = "RemoteOrderGoodsClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteOrderGoodsFallbackFactory.class)
public interface RemoteOrderGoodsClient {
 
    /**
     * 查询指定商品订单
     */
    @PostMapping("/order-good/selectGoodsOrder")
    R<List<OrderGood>> goodsOrder(@RequestBody List<Long> goodsIds);
 
    /**
     * 根据ids查找订单列表
     */
    @PostMapping("/order/getOrderListByIds")
    R<List<Order>> getOrderListByIds(@RequestBody List<Long> orderIds);
 
    @PostMapping("/order/byUserId")
    R<List<Order>> byUserId(@RequestParam("appUserId") Long appUserId,@RequestParam("shopId") Integer shopId);
    @PostMapping("/order/byShopId")
    R<List<Order>> byShopId(@RequestParam("shopId") Integer shopId);
    @PostMapping("/order/byShopIdAndUserId")
    R<List<Order>> byShopIdAndUserId(@RequestParam("appUserId") Long appUserId,@RequestParam("shopId") Integer shopId);
 
 
    /**
     * 根据用户id和商品id查找订单列表
     */
    @GetMapping("/order-good/getOrderListByUserIdAndGoodsId")
    R<List<Order>> getOrderListByUserIdAndGoodsId(@RequestParam("userId") Long userId, @RequestParam("goodsId") Integer goodsId);
 
    /**
     * 更新订单状态
     */
    @PostMapping("/order/updateOrderStatus")
    R<Void> updateOrderStatus(@RequestBody Order order);
 
    /**
     * 预约技师
     */
    @PostMapping("/order/subscribe")
    R<Void> subscribe(@RequestParam(value = "id", required = false) Long id, @RequestParam(value = "technicianId", required = false) Integer technicianId);
 
 
 
    @GetMapping("/shopping-cart/getGoodsPrice")
    R<Price> getGoodsPrice(@RequestParam("appUserId") Long appUserId, @RequestParam("goodsId") Integer goodsId, @RequestParam("shopId") Integer shopId);
    @PostMapping("/order/getLastOrder")
    R<Order> getLastOrder(@RequestParam("appUserId") Long appUserId);
 
 
    @PostMapping("/order-good/getUnDistributedOrder")
    R<List<OrderGood>> getUnDistributedOrder(@RequestBody List<Long> appUserIds);
 
}