Skip to content

Commit

Permalink
feat: remove scaling as it is not necessary at parent level
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Nov 13, 2023
1 parent a2a5c5f commit a3acb02
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ default void addOrderItemRequestToOrderEntity(
@Mapping(
target = "totalPrice",
expression =
"java(items.stream().map(OrderItemResponse::price).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(2, RoundingMode.HALF_UP))")
"java(items.stream().map(OrderItemResponse::price).reduce(BigDecimal.ZERO, BigDecimal::add))")
@Mapping(source = "id", target = "orderId")
OrderResponse toResponse(Order order);

Expand Down

0 comments on commit a3acb02

Please sign in to comment.