From 3eac3116ce54c2593f09a74feed370cf0800028e Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期一, 13 一月 2025 21:21:10 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java index 752d42e..e023049 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java @@ -205,6 +205,7 @@ public R<Void> updateOrderStatus(@RequestBody Order order){ Order order1 = orderService.getById(order.getId()); order1.setOrderStatus(order.getOrderStatus()); + order1.setOldOrderStatus(order.getOldOrderStatus()); orderService.updateById(order1); return R.ok(); } @@ -450,5 +451,29 @@ } return R.ok(); } + + + /** + * 根据id获取订单详情 + * @param id + * @return + */ + @PostMapping("/getOrderById") + public R<Order> getOrderById(@RequestParam("id") Long id){ + Order order = orderService.getById(id); + return R.ok(order); + } + + + /** + * 修改订单 + * @param order + * @return + */ + @PostMapping("/editOrder") + public R editOrder(@RequestBody Order order){ + orderService.updateById(order); + return R.ok(); + } } -- Gitblit v1.7.1