| | |
| | | package com.ruoyi.order.controller.inner; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.enums.OrderStatusEnum; |
| | | import com.ruoyi.common.core.utils.page.BeanUtils; |
| | | import com.ruoyi.common.security.annotation.InnerAuth; |
| | | import com.ruoyi.order.service.IOrderService; |
| | |
| | | |
| | | } |
| | | |
| | | @PostMapping("/getOrderOne") |
| | | @ResponseBody |
| | | @InnerAuth |
| | | public R<Order> getOrderOne(@RequestBody OrderDTO OrderDTO) { |
| | | |
| | | LambdaQueryWrapper<Order> wrapper= Wrappers.lambdaQuery(); |
| | | wrapper.eq(Order::getMemberId,OrderDTO.getMemberId()); |
| | | wrapper.eq(Order::getOrderFrom,4); |
| | | wrapper.eq(Order::getAuctionOrderType,2 ); |
| | | wrapper.eq(Order::getGoodsSkuId,OrderDTO.getGoodsSkuId()); |
| | | wrapper.eq(Order::getDelFlag,0); |
| | | wrapper.orderByDesc(Order::getCancelTime); |
| | | Order page1 = orderService.getOne(wrapper); |
| | | |
| | | return R.ok(page1); |
| | | |
| | | } |
| | | |
| | | @PostMapping("/getOrderOne1") |
| | | @ResponseBody |
| | | @InnerAuth |
| | | public R<Order> getOrderOne1(@RequestBody OrderDTO OrderDTO) { |
| | | |
| | | LambdaQueryWrapper<Order> wrapper= Wrappers.lambdaQuery(); |
| | | wrapper.eq(Order::getMemberId,OrderDTO.getMemberId()); |
| | | wrapper.eq(Order::getOrderStatus,4); |
| | | wrapper.eq(Order::getAuctionOrderType,1 ); |
| | | wrapper.eq(Order::getGoodsSkuId,OrderDTO.getGoodsSkuId()); |
| | | wrapper.eq(Order::getDelFlag,0); |
| | | wrapper.orderByDesc(Order::getCancelTime); |
| | | Order page1 = orderService.getOne(wrapper); |
| | | |
| | | return R.ok(page1); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取某个商品的已购会员数 |
| | |
| | | R<Order> getOrderByGroupPurchaseMemberId(@RequestBody HomeGoodsSkuDTO homeGoodsSkuDTO){ |
| | | return R.ok(orderService.getOrderByGroupPurchaseMemberId(homeGoodsSkuDTO)); |
| | | } |
| | | @InnerAuth |
| | | @ResponseBody |
| | | @PostMapping("/getOrderByGroupPurchaseMemberId1") |
| | | R<Order> getOrderByGroupPurchaseMemberId1(@RequestBody HomeGoodsSkuDTO homeGoodsSkuDTO){ |
| | | return R.ok(orderService.getOrderByGroupPurchaseMemberId1(homeGoodsSkuDTO)); |
| | | } |
| | | |
| | | |
| | | @InnerAuth |
| | | @ResponseBody |
| | |
| | | * @param couponIds 优惠券id集合 |
| | | * @return List<Order> |
| | | */ |
| | | @PostMapping("/order/list-by-coupon") |
| | | @PostMapping("/list-by-coupon") |
| | | R<List<Order>> getOrderByCouponIds(@RequestBody Collection<Long> couponIds) { |
| | | return R.ok(orderService.getOrderByCouponIds(couponIds)); |
| | | } |
| | | @InnerAuth |
| | | @GetMapping("/autoCancelOrder/{id}") |
| | | R<?> autoCancelOrder(@PathVariable("id") Long oid) { |
| | | Order byId = orderService.getById(oid); |
| | | if (byId.getOrderStatus().getCode()==1){ |
| | | byId.setOrderStatus(OrderStatusEnum.CANCELED); |
| | | orderService.updateById(byId); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @InnerAuth |
| | | @PostMapping("/getOrderListByMubres") |
| | | R<List<Order>> getOrderListByMubres(@RequestBody List<String> mubres) { |
| | | return R.ok(orderService.getOrderListByMubres(mubres)); |
| | | } |
| | | |
| | | @InnerAuth |
| | | @PostMapping("/updOrderStatusByMubres") |
| | | R<?> updateOrderStatusByMubres(@RequestBody List<String> formedGroupMubres) { |
| | | orderService.updateOrderStatusByMubres(formedGroupMubres); |
| | | return R.ok(); |
| | | } |
| | | } |