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"))); }