xuhy
2025-01-15 c27c1f2beb4ca89a94eaa854fce6b4553db8f2f8
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/RemoteOrderGoodsClient.java
@@ -6,11 +6,15 @@
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 {
@@ -19,17 +23,42 @@
     * 查询指定商品订单
     */
    @PostMapping("/order-good/selectGoodsOrder")
    public R<List<OrderGood>> goodsOrder(@RequestBody List<Long> goodsIds);
    R<List<OrderGood>> goodsOrder(@RequestBody List<Long> goodsIds);
    /**
     * 根据ids查找订单列表
     */
    @PostMapping("/order/getOrderListByIds")
    public R<List<Order>> getOrderListByIds(@RequestBody List<Long> orderIds);
    R<List<Order>> getOrderListByIds(@RequestBody List<Long> orderIds);
    @PostMapping("/order/byUserId")
    R<List<Order>> byUserId(@RequestParam("appUserId") Long appUserId,@RequestParam("shopId") Long shopId);
    @PostMapping("/order/byShopId")
    R<List<Order>> byShopId(@RequestParam("shopId") Integer shopId);
    /**
     * 根据用户id和商品id查找订单列表
     */
    @PostMapping("/order/getOrderListByUserIdAndGoodsId")
    public R<List<Order>> getOrderListByUserIdAndGoodsId(@RequestBody OrderGood orderGood);
    @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);
}