| | |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.page.TableDataInfo; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.order.enums.OrderStatus; |
| | | import com.ruoyi.order.model.Order; |
| | | import com.ruoyi.order.service.OrderService; |
| | | import com.ruoyi.order.vo.OrderDetailVO; |
| | |
| | | }) |
| | | @GetMapping("/cancel/{orderId}") |
| | | public R<Void> cancel(@PathVariable("orderId") Long orderId){ |
| | | // TODO 待完善 |
| | | orderService.update(new LambdaUpdateWrapper<Order>() |
| | | .eq(Order::getId, orderId) |
| | | .set(Order::getOrderStatus, OrderStatus.CANCELLED.getCode())); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | }) |
| | | @GetMapping("/confirm/{orderId}") |
| | | public R<Void> confirm(@PathVariable("orderId") Long orderId){ |
| | | // TODO 待完善 |
| | | Order order = orderService.getById(orderId); |
| | | order.setOrderStatus(OrderStatus.COMPLETED.getCode()); |
| | | orderService.updateById(order); |
| | | return R.ok(); |
| | | } |
| | | |