Pu Zhibing
2025-01-16 c137760697814b57c8ccb92cb1e0ed9d873f3045
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/feignClient/OrderClient.java
@@ -1,11 +1,17 @@
package com.ruoyi.order.feignClient;
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.order.factory.OrderClientFallbackFactory;
import com.ruoyi.order.model.Order;
import org.springframework.cloud.openfeign.FeignClient;
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;
/**
 * @author zhibing.pu
@@ -18,6 +24,7 @@
    /**
     * 获取商品销售数量
     * @param goodsId
     * @param type 购买类型(1=普通商品,2=秒杀商品)
     * @return
     */
    @PostMapping("/order/getGoodsSaleNum")
@@ -32,4 +39,31 @@
     */
    @PostMapping("/order/getShopSaleNum")
    R<Integer> getShopSaleNum(@RequestParam("shopId") Integer shopId, @RequestParam("type") Integer type);
    /**
     * 获取所有在指定门店消费的用户id
     * @param shopId
     * @return
     */
    @PostMapping("/order/getAppUserByShoppingShop")
    R<Set<Long>> getAppUserByShoppingShop(@RequestParam("shopId") Integer shopId);
    /**
     * 根据id获取订单详情
     * @param id
     * @return
     */
    @PostMapping("/order/getOrderById")
    R<Order> getOrderById(@RequestParam("id") Long id);
    /**
     * 编辑订单详情
     * @param order
     * @return
     */
    @PostMapping("/order/editOrder")
    R editOrder(@RequestBody Order order);
}