Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
46517c7c28
@ -296,7 +296,7 @@ public class OrderAnalysisServiceImpl implements OrderAnalysisService {
|
||||
*/
|
||||
private BigDecimal calculateTotalAmount(List<OrderMain> orders) {
|
||||
return orders.stream()
|
||||
.map(OrderMain::getAmount) // 假设订单实体有 amount 字段
|
||||
.map(OrderMain::getTotalAmount) // totalAmount为订单总金额
|
||||
.filter(Objects::nonNull)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user