更新了写真预约特殊产品处理

This commit is contained in:
chen-xin-zhi 2025-03-04 08:57:12 +08:00
parent c2d356864c
commit df92ed4fa0

View File

@ -73,13 +73,11 @@ public class PendingServiceGoodController {
throw new BusinessException(ErrorCode.PARAMS_ERROR);
}
QueryWrapper<PendingServiceGood> queryWrapper = pendingServiceGoodService.getQueryWrapper(bookingOrderQueryRequest);
long current = bookingOrderQueryRequest.getCurrent();
long pageSize = bookingOrderQueryRequest.getPageSize();
Page<PendingServiceGood> page = pendingServiceGoodService.page(new Page<>(current, pageSize), queryWrapper);
List<PendingServiceGood> pendingServiceGoodList = page.getRecords();
List<PendingServiceGood> pendingServiceGoodList = pendingServiceGoodService.list(queryWrapper);
// 获取服务类待处理订单
List<PendingServiceOrder> pendingServiceOrderList = commonService.findByFieldInTargetField(pendingServiceGoodList, pendingServiceOrderService, PendingServiceGood::getId, "pendingId");
// 封装成服务类待处理订单VO
List<PendingServiceOrderVO> pendingServiceOrderVOS = commonService.convertList(pendingServiceOrderList, PendingServiceOrderVO.class);
// 封装map集合服务类商品待处理id待处理服务类订单列表
@ -105,12 +103,18 @@ public class PendingServiceGoodController {
pendingServiceGoodVOList.add(pendingServiceGoodVO);
}
long current = bookingOrderQueryRequest.getCurrent();
long pageSize = bookingOrderQueryRequest.getPageSize();
long total = pendingServiceOrderList.size();
long pages = (total + pageSize - 1) / pageSize;
Page<PendingServiceGoodVO> voPage = new Page<>();
voPage.setRecords(pendingServiceGoodVOList);
voPage.setTotal(page.getTotal());
voPage.setSize(page.getSize());
voPage.setCurrent(page.getCurrent());
voPage.setPages(page.getPages());
voPage.setTotal(total);
voPage.setSize(pageSize);
voPage.setCurrent(current);
voPage.setPages(pages);
return ResultUtils.success(voPage);
}