|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.ruoyi.common.core.constant.ServiceNameConstants; | 
|---|
|  |  |  | import com.ruoyi.common.core.domain.R; | 
|---|
|  |  |  | import com.ruoyi.order.api.factory.ChargingOrderFallbackFactory; | 
|---|
|  |  |  | import com.ruoyi.common.core.dto.ExchangeDto; | 
|---|
|  |  |  | import com.ruoyi.order.api.factory.OrderFallbackFactory; | 
|---|
|  |  |  | import com.ruoyi.order.api.model.ChargingListQuery; | 
|---|
|  |  |  | import com.ruoyi.order.api.model.TShoppingOrder; | 
|---|
|  |  |  | import com.ruoyi.order.api.model.TVipOrder; | 
|---|
|  |  |  | import com.ruoyi.order.api.query.TActivityStatisticsQuery; | 
|---|
|  |  |  | import com.ruoyi.order.api.vo.AccountListVO; | 
|---|
|  |  |  | import com.ruoyi.order.api.vo.TActivityVO; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import org.springframework.cloud.openfeign.FeignClient; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.PostMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | * 后台订单服务 | 
|---|
|  |  |  | * @author ruoyi | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @FeignClient(contextId = "OrderClient", value = ServiceNameConstants.CONTRACT_ORDER, fallbackFactory = OrderFallbackFactory.class) | 
|---|
|  |  |  | @FeignClient(contextId = "OrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = OrderFallbackFactory.class) | 
|---|
|  |  |  | public interface OrderClient { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("/t-exchange-order/getSalesCountByGoodsIds") | 
|---|
|  |  |  | R<List<Integer>> getSalesCountByGoodsId(String goodsIds); | 
|---|
|  |  |  | @GetMapping("/t-exchange-order/getSalesCountByGoodsIds/{goodsIds}") | 
|---|
|  |  |  | R<List<Integer>> getSalesCountByGoodsId(@PathVariable("goodsIds") String goodsIds); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 管理后台 根据t_app_coupon订单购买或者兑换优惠券的订单编号 | 
|---|
|  |  |  | * @param goodsIds  订单号-商品类型 | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping("/t-exchange-order/getCodeByOrderId/{goodsIds}") | 
|---|
|  |  |  | public R<List<String>> getCodeByOrderId(@PathVariable("goodsIds")String goodsIds); | 
|---|
|  |  |  | //查询已兑换的订单数 | 
|---|
|  |  |  | @PostMapping("/t-exchange-order/getById") | 
|---|
|  |  |  | public R<Long> getExchangeById(@RequestParam("goodId") Integer goodId,@RequestParam("userId")  Long userId,@RequestParam("goodType") Integer goodType); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("/t-exchange-order/create") | 
|---|
|  |  |  | public R<Long> exchangeCreate(@RequestBody ExchangeDto exchangeDto); | 
|---|
|  |  |  | @PostMapping("/t-vip-order//addVipOrder") | 
|---|
|  |  |  | public R<Long> addVipOrder(@RequestBody TVipOrder vipOrder); | 
|---|
|  |  |  | @PostMapping("/t-shopping-order/create") | 
|---|
|  |  |  | public R<TShoppingOrder> shopCreate(@RequestBody ExchangeDto exchangeDto); | 
|---|
|  |  |  | @PostMapping("/t-shopping-order/callBack") | 
|---|
|  |  |  | public R callBack(@RequestParam("code")String code,@RequestParam("outTradeNo")String outTradeNo); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 管理后台 活动费用统计 | 
|---|
|  |  |  | * @param | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping(value = "/t-exchange-order/activityStatistics") | 
|---|
|  |  |  | public R<TActivityVO> activityStatistics(@RequestBody TActivityStatisticsQuery dto); | 
|---|
|  |  |  | @PostMapping(value = "/chargingBill/accountBillList") | 
|---|
|  |  |  | @ApiOperation(value = "列表查询", tags = {"管理后台-账户结算账单"}) | 
|---|
|  |  |  | R<AccountListVO> accountBillList(@RequestBody ChargingListQuery dto); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|