提交代码

master
胡锐 6 months ago
parent 26928992e9
commit e69adde642
  1. 4
      order/src/main/java/com/order/controller/OrderController.java
  2. 3
      service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.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<String,Object> 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);

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

Loading…
Cancel
Save