Skip to content

Commit

Permalink
build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
palatsangeetha committed Feb 8, 2024
1 parent cdaa214 commit 8de016c
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;

@Mapper(componentModel = "spring")
public interface TransportEventMapper {
@Mappings(
Expand All @@ -15,11 +18,8 @@ public interface TransportEventMapper {
})
TimestampTO toTO(TransportEvent transportEvent);

@Mappings(
value = {
@Mapping(target = "transportEventTypeCode", source = "eventTypeCode"),
@Mapping(target = "eventClassifierCode", source = "eventClassifierCode"),
@Mapping(target = "eventCreatedDateTime", source = "eventCreatedDateTime"),
})
TransportEvent toEntity(TimestampTO timestampTO);
default String map(OffsetDateTime value){
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ssXXX");
return value.format(formatter);
}
}

0 comments on commit 8de016c

Please sign in to comment.