提交代码

master
胡锐 6 months ago committed by yuanye
parent 08f299cd00
commit 06ac67c804
  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 @ResponseBody
@ApiOperation(value = "查询用户订单") @ApiOperation(value = "查询用户订单")
public ResponseData queryUserOrder(@RequestParam(value = "orderNo" , required = false) String orderNo, 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 = "pageNum" , required = true) Integer pageNum,
@RequestParam(value = "pageSize" , required = true) Integer pageSize) { @RequestParam(value = "pageSize" , required = true) Integer pageSize) {
try { try {
@ -138,9 +139,10 @@ public class OrderController {
Map<String,Object> param = new HashMap<>(); Map<String,Object> param = new HashMap<>();
param.put("userId", userSession.getUser().getId()); param.put("userId", userSession.getUser().getId());
param.put("orderNo", orderNo); param.put("orderNo", orderNo);
param.put("orderStatus", orderStatus);
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);
return ResponseMsgUtil.success(new PageInfo<>(orderService.getOrderList(param))); return ResponseMsgUtil.success(new PageInfo<>(orderService.getUserOrderList(param)));
} catch (Exception e) { } catch (Exception e) {
log.error("error!",e); log.error("error!",e);

@ -274,6 +274,9 @@ public class BsOrderServiceImpl implements BsOrderService {
if (MapUtils.getInteger(param, "payType") != null) { if (MapUtils.getInteger(param, "payType") != null) {
criteria.andPayTypeEqualTo(MapUtils.getInteger(param, "payType")); criteria.andPayTypeEqualTo(MapUtils.getInteger(param, "payType"));
} }
if (MapUtils.getInteger(param, "orderStatus") != null) {
criteria.andOrderStatusEqualTo(MapUtils.getInteger(param, "orderStatus"));
}
if (MapUtils.getLong(param, "createTimeS") != null) { if (MapUtils.getLong(param, "createTimeS") != null) {
criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeS"))); criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeS")));
} }

Loading…
Cancel
Save