修改了分页查询订单接口
This commit is contained in:
parent
4088f26758
commit
f8345cd3e8
|
@ -131,7 +131,7 @@ public class OrderController {
|
||||||
@PostMapping("/list/page")
|
@PostMapping("/list/page")
|
||||||
@Operation(summary = "Web端管理员分页查询订单", description = "参数:订单查询请求体,权限:管理员(admin, boss),方法名:listOrder")
|
@Operation(summary = "Web端管理员分页查询订单", description = "参数:订单查询请求体,权限:管理员(admin, boss),方法名:listOrder")
|
||||||
@AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
|
@AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
|
||||||
public BaseResponse<List<OrderVO>> listOrder(@RequestBody OrderQueryRequest orderQueryRequest) {
|
public BaseResponse<Page<OrderVO>> listOrder(@RequestBody OrderQueryRequest orderQueryRequest) {
|
||||||
if (orderQueryRequest == null) {
|
if (orderQueryRequest == null) {
|
||||||
throw new BusinessException(ErrorCode.PARAMS_ERROR);
|
throw new BusinessException(ErrorCode.PARAMS_ERROR);
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,13 @@ public class OrderController {
|
||||||
List<OrderItems> list = orderItemService.list(queryWrapper);
|
List<OrderItems> list = orderItemService.list(queryWrapper);
|
||||||
orderVO.setOrderItemList(list);
|
orderVO.setOrderItemList(list);
|
||||||
});
|
});
|
||||||
return ResultUtils.success(orderVOS);
|
Page<OrderVO> orderVOPage = new Page<>();
|
||||||
|
orderVOPage.setRecords(orderVOS);
|
||||||
|
orderVOPage.setTotal(page.getTotal());
|
||||||
|
orderVOPage.setPages(page.getPages());
|
||||||
|
orderVOPage.setCurrent(page.getCurrent());
|
||||||
|
orderVOPage.setSize(page.getSize());
|
||||||
|
return ResultUtils.success(orderVOPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user