| | |
| | | package com.ruoyi.system.api.feignClient; |
| | | |
| | | import com.ruoyi.common.core.constant.SecurityConstants; |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.Order; |
| | |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestHeader; |
| | | |
| | | @FeignClient(contextId = "orderClient", value = ServiceNameConstants.RUOYI_ORDER, fallbackFactory = OrderFallbackFactory.class) |
| | | public interface OrderClient { |
| | | |
| | | @PostMapping("/order/saveOrderOne") |
| | | R<Boolean> saveOrderOne(@RequestBody OrderDTO orderDTO); |
| | | R<Boolean> saveOrderOne(@RequestBody OrderDTO orderDTO, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | |
| | | @PostMapping("/order-auction-bond/getOrderAuctionBond") |
| | | R<Boolean> getOrderAuctionBond(@RequestBody OrderAuctionBondDTO orderAuctionBondDTO); |
| | | R<Boolean> getOrderAuctionBond(@RequestBody OrderAuctionBondDTO orderAuctionBondDTO, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | /** |
| | | * 获取某个商品的已购会员数 |
| | |
| | | * @return 已购会员数 |
| | | */ |
| | | @GetMapping("/order/seckill-members/{id}") |
| | | R<Integer> getSeckillMembers(@PathVariable("id") Long id); |
| | | R<Integer> getSeckillMembers(@PathVariable("id") Long id, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | /** |
| | | * 获取团购商品已购数量 |
| | |
| | | * @return 团购商品已购数量 |
| | | */ |
| | | @GetMapping("/order/group-purchase-num/{id}") |
| | | R<Integer> getGroupPurchasesGoodsNum(@PathVariable("id") Long id); |
| | | R<Integer> getGroupPurchasesGoodsNum(@PathVariable("id") Long id, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | |
| | | /** |
| | | * 根据团购商品id获取订单列表 |
| | |
| | | * @return List<Order> 订单列表 |
| | | */ |
| | | @GetMapping("/order/group-purchase-id/{id}") |
| | | R<List<Order>> getOrderByGroupPurchaseId(@PathVariable("id") Long id); |
| | | R<List<Order>> getOrderByGroupPurchaseId(@PathVariable("id") Long id, |
| | | @RequestHeader(SecurityConstants.FROM_SOURCE) String source); |
| | | } |