Skip to content

Commit

Permalink
modified Mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
Optic-Okulist committed Oct 4, 2023
1 parent dd5b8e2 commit d82a058
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/spring/boot/bookstore/mapper/OrderMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

@Mapper(config = MapperConfig.class, uses = OrderItemMapper.class)
public interface OrderMapper {
@Mappings({@Mapping(target = "userId", source = "user.id")})
@Mappings({@Mapping(target = "userId", source = "user.id"),
@Mapping(source = "orderDate", target = "orderTime")})
@Mapping(source = "total", target = "totalPrice")
OrderResponseDto toDto(Order order);
}

0 comments on commit d82a058

Please sign in to comment.