| | |
| | | package com.ruoyi.order.controller.inner; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.BeanUtils; |
| | | import com.ruoyi.common.security.annotation.InnerAuth; |
| | |
| | | import com.ruoyi.system.api.domain.dto.HomeGoodsSkuDTO; |
| | | import com.ruoyi.system.api.domain.dto.OrderDTO; |
| | | import com.ruoyi.system.api.domain.dto.OrderUpdDTO; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.system.api.domain.vo.OrderVO; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | |
| | | /** |
| | |
| | | public R<T> saveOrderOne(@RequestBody OrderDTO OrderDTO) { |
| | | orderService.saveOrderOne(OrderDTO); |
| | | return R.ok(); |
| | | |
| | | } |
| | | |
| | | @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::getOrderStatus,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); |
| | | |
| | | } |
| | | |
| | |
| | | orderService.updateBatchById(orders); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 根据优惠券id集合查询订单列表 |
| | | * |
| | | * @param couponIds 优惠券id集合 |
| | | * @return List<Order> |
| | | */ |
| | | @PostMapping("/order/list-by-coupon") |
| | | R<List<Order>> getOrderByCouponIds(@RequestBody Collection<Long> couponIds) { |
| | | return R.ok(orderService.getOrderByCouponIds(couponIds)); |
| | | } |
| | | } |