|
@@ -703,11 +703,10 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
|
|
|
pageInfo.setTotal(count);
|
|
|
params.put("offset", pageInfo.getOffset());
|
|
|
dataList = musicGroupPaymentCalenderDetailDao.queryDetailPage(params);
|
|
|
- List<Long> orderIds = dataList.stream().map(e -> e.getPaymentOrderId()).collect(Collectors.toList());
|
|
|
- List<StudentPaymentOrderDetail> orderDetail = studentPaymentOrderDetailDao.getOrderDetailByOrderId(orderIds);
|
|
|
- Map<Long, List<StudentPaymentOrderDetail>> orderDetailMap = orderDetail.stream().collect(Collectors.groupingBy(StudentPaymentOrderDetail::getPaymentOrderId));
|
|
|
+ List<StudentPaymentOrderDetail> orderDetail = studentPaymentOrderDetailDao.findByCalenderId(dataList.get(0).getMusicGroupPaymentCalenderId());
|
|
|
+ Map<Integer, List<StudentPaymentOrderDetail>> orderDetailMap = orderDetail.stream().collect(Collectors.groupingBy(StudentPaymentOrderDetail::getUserId));
|
|
|
for (MusicGroupPaymentCalenderDetailDto row : dataList) {
|
|
|
- List<StudentPaymentOrderDetail> orderDetailList = orderDetailMap.get(row.getPaymentOrderId());
|
|
|
+ List<StudentPaymentOrderDetail> orderDetailList = orderDetailMap.get(row.getUserId());
|
|
|
if(orderDetailList != null && orderDetailList.size() > 0){
|
|
|
BigDecimal totalAmount = orderDetailList.stream().map(e -> e.getPrice()).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
//辅件
|