Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
svencc committed Oct 17, 2023
1 parent f044fea commit e1729c7
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/main/java/com/recom/mapper/MessageMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ public interface MessageMapper {

MessageMapper INSTANCE = Mappers.getMapper(MessageMapper.class);

@NonNull
@Named("timestampToTimestampEpochMilliseconds")
static long timestampToTimestampEpochMilliseconds(@Nullable final LocalDateTime timestamp) {
return timestamp.toInstant(ZoneOffset.UTC).toEpochMilli();
}

@Mapping(source = "timestamp", target = "timestampEpochMilliseconds", qualifiedByName = "timestampToTimestampEpochMilliseconds")
@Mapping(source = "timestampConfirmation", target = "timestampConfirmationEpochMilliseconds", qualifiedByName = "timestampToTimestampEpochMilliseconds")
MessageDto toDto(final Message entity);

}

0 comments on commit e1729c7

Please sign in to comment.