Browse Source

原有的业务逻辑不支持同一笔订单明细分润导多个账户,所以这里先比较金额大小,如果有更复杂的分润情况出现,这里无法满足

zouxuan 1 year ago
parent
commit
dcee3d2753

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java

@@ -3231,7 +3231,7 @@ public class ExportServiceImpl implements ExportService {
         orderDetailTypeServiceConsumerMap.put(OrderDetailTypeEnum.MAINTENANCE, (orderDto, detail) -> orderDto.setMaintenanceFee(orderDto.getMaintenanceFee().add(detail.getPrice())));
         //原有的业务逻辑不支持同一笔订单明细分润导多个账户,所以这里先比较金额大小,会有bug
         BiConsumer<StudentPaymentOrderExportDto, StudentPaymentOrderDetail> con2 =
-                (orderDto, detail) -> orderDto.setCloudTeacherFee(orderDto.getCloudTeacherFee().add(detail.getPrice()).compareTo(orderDto.getServiceFee()) > 0 ? orderDto.getServiceFee() : orderDto.getCloudTeacherFee().add(detail.getPrice()));
+                (orderDto, detail) -> orderDto.setCloudTeacherFee(orderDto.getCloudTeacherFee().add(detail.getPrice()).compareTo(orderDto.getServiceAmount()) > 0 ? orderDto.getServiceAmount() : orderDto.getCloudTeacherFee().add(detail.getPrice()));
         orderDetailTypeServiceConsumerMap.put(OrderDetailTypeEnum.CLOUD_TEACHER, con2);
         orderDetailTypeServiceConsumerMap.put(OrderDetailTypeEnum.CLOUD_TEACHER_PLUS, con2);
         orderDetailTypeServiceConsumerMap.put(OrderDetailTypeEnum.THEORY_COURSE, (orderDto, detail) -> orderDto.setTheoryCourseFee(orderDto.getTheoryCourseFee().add(detail.getPrice())));