From 04d3aefab05b22204021e7e29c024b96d53bc33d Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Tue, 25 Oct 2022 14:03:39 +0800 Subject: [PATCH] 1 --- .../controller/HighThirdPartyController.java | 6 +++--- .../com/web/controller/OrderController.java | 19 ++++++++++++++++--- .../com/hai/order/service/OrderService.java | 10 ++++++++++ .../order/service/impl/OrderServiceImpl.java | 11 +++++++++++ 4 files changed, 40 insertions(+), 6 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java b/hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java index e2939002..9c4775ee 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java @@ -362,14 +362,14 @@ public class HighThirdPartyController { - @RequestMapping(value = "/getThirdOrderByOrderId", method = RequestMethod.GET) + @RequestMapping(value = "/getThirdOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询第三方订单详情") - public ResponseData getThirdOrderByOrderId(@RequestParam(name = "orderId", required = true) Long orderId) { + public ResponseData getThirdOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { - HighOrder order = highOrderService.getOrderById(orderId); + HighOrder order = highOrderService.getOrderByOrderNo(orderNo); JSONObject object; ThirdPartyModel partyModel = new ThirdPartyModel(); diff --git a/hai-order/src/main/java/com/web/controller/OrderController.java b/hai-order/src/main/java/com/web/controller/OrderController.java index 96d0b179..4e31d1be 100644 --- a/hai-order/src/main/java/com/web/controller/OrderController.java +++ b/hai-order/src/main/java/com/web/controller/OrderController.java @@ -52,9 +52,6 @@ public class OrderController { @Resource private UserCenter userCenter; - @Autowired - private RocketMQTemplate rocketMQTemplate; - @RequestMapping(value="/create",method = RequestMethod.POST) @ResponseBody @ApiOperation(value = "创建订单") @@ -257,4 +254,20 @@ public class OrderController { } } + @RequestMapping(value = "/orderCheck", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "根据订单id查看订单") + public ResponseData orderCheck(@RequestParam(name = "orderNo", required = true) String orderNo) { + try { + + orderService.orderCheck(orderNo); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighOrderController --> cancelOrder() error!", e); + return ResponseMsgUtil.exception(e); + } + } + } diff --git a/hai-service/src/main/java/com/hai/order/service/OrderService.java b/hai-service/src/main/java/com/hai/order/service/OrderService.java index 33c15897..2488c41f 100644 --- a/hai-service/src/main/java/com/hai/order/service/OrderService.java +++ b/hai-service/src/main/java/com/hai/order/service/OrderService.java @@ -82,4 +82,14 @@ public interface OrderService { */ List getOrderList(Map param); + /** + * @Author Sum1Dream + * @Name orderCheck + * @Description // 查看订单 + * @Date 13:55 2022/10/25 + * @Param [orderNo] + * @Return void + */ + void orderCheck(String orderNo); + } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java index 656eebfd..52b60750 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java @@ -655,4 +655,15 @@ public class OrderServiceImpl implements OrderService { example.setOrderByClause("create_time desc"); return orderMapper.selectByExample(example); } + + @Override + public void orderCheck(String orderNo) { + HighOrder highOrder = getOrderDetailByNo(orderNo); + + highOrder.setWhetherCheck(true); + + if (highOrder.getOrderStatus() == 3) { + orderMapper.updateByPrimaryKey(highOrder); + } + } }