From 06ac67c8048bb6b3f0b1a66634259cc8c0de3ff0 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Thu, 16 May 2024 17:39:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- order/src/main/java/com/order/controller/OrderController.java | 4 +++- .../java/com/hfkj/service/order/impl/BsOrderServiceImpl.java | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/order/src/main/java/com/order/controller/OrderController.java b/order/src/main/java/com/order/controller/OrderController.java index a62de41..d1402f7 100644 --- a/order/src/main/java/com/order/controller/OrderController.java +++ b/order/src/main/java/com/order/controller/OrderController.java @@ -127,6 +127,7 @@ public class OrderController { @ResponseBody @ApiOperation(value = "查询用户订单") public ResponseData queryUserOrder(@RequestParam(value = "orderNo" , required = false) String orderNo, + @RequestParam(value = "orderStatus" , required = false) Integer orderStatus, @RequestParam(value = "pageNum" , required = true) Integer pageNum, @RequestParam(value = "pageSize" , required = true) Integer pageSize) { try { @@ -138,9 +139,10 @@ public class OrderController { Map param = new HashMap<>(); param.put("userId", userSession.getUser().getId()); param.put("orderNo", orderNo); + param.put("orderStatus", orderStatus); PageHelper.startPage(pageNum, pageSize); - return ResponseMsgUtil.success(new PageInfo<>(orderService.getOrderList(param))); + return ResponseMsgUtil.success(new PageInfo<>(orderService.getUserOrderList(param))); } catch (Exception e) { log.error("error!",e); diff --git a/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java index 325fbf3..0c59155 100644 --- a/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java @@ -274,6 +274,9 @@ public class BsOrderServiceImpl implements BsOrderService { if (MapUtils.getInteger(param, "payType") != null) { criteria.andPayTypeEqualTo(MapUtils.getInteger(param, "payType")); } + if (MapUtils.getInteger(param, "orderStatus") != null) { + criteria.andOrderStatusEqualTo(MapUtils.getInteger(param, "orderStatus")); + } if (MapUtils.getLong(param, "createTimeS") != null) { criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeS"))); }