Skip to content

Commit

Permalink
P4PU-590 updated Mapper with convertToZonedDateTimeAndTruncateSeconds
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe-LaManna committed Oct 28, 2024
1 parent f0a7340 commit 87e539e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
@Mapper(componentModel = "spring", uses = {PullPaymentOptionStatus2PaymentOptionStatusMapper.class, MapperUtilities.class})
public interface PullPaymentInstallmentDTO2InstallmentDTOMapper {

@Mapping(source = "insertedDate", target = "insertedDate", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, qualifiedByName = "truncateToSeconds")
@Mapping(source = "lastUpdatedDate", target = "lastUpdatedDate", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, qualifiedByName = "truncateToSeconds")
@Mapping(source = "insertedDate", target = "insertedDate", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, qualifiedByName = "convertToZonedDateTimeAndTruncateSeconds")
@Mapping(source = "lastUpdatedDate", target = "lastUpdatedDate", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, qualifiedByName = "convertToZonedDateTimeAndTruncateSeconds")
@Mapping(source = "dueDate", target = "dueDate", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, qualifiedByName = "convertToZonedDateTimeAndTruncateSeconds")
@Mapping(source = "retentionDate", target = "retentionDate", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, qualifiedByName = "convertToZonedDateTimeAndTruncateSeconds")
InstallmentDTO toInstallmentDTO(PullPaymentInstallmentDTO pullPaymentInstallmentDTOSource);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
@Mapper(componentModel = "spring", uses = {PullPaymentNoticeStatus2PaymentNoticeStatusMapper.class, PullPaymentOptionDTO2PaymentOptionDTOMapper.class, MapperUtilities.class})
public interface PullPaymentNoticeDTO2PaymentNoticeDTOMapper {

@Mapping(source = "insertedDate", target = "insertedDate", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, qualifiedByName = "truncateToSeconds")
@Mapping(source = "publishDate", target = "publishDate", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, qualifiedByName = "truncateToSeconds")
@Mapping(source = "validityDate", target = "validityDate", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, qualifiedByName = "truncateToSeconds")
@Mapping(source = "insertedDate", target = "insertedDate", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, qualifiedByName = "convertToZonedDateTimeAndTruncateSeconds")
@Mapping(source = "publishDate", target = "publishDate", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, qualifiedByName = "convertToZonedDateTimeAndTruncateSeconds")
@Mapping(source = "validityDate", target = "validityDate", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, qualifiedByName = "convertToZonedDateTimeAndTruncateSeconds")
PaymentNoticeDTO toPaymentNoticeDTO(PullPaymentNoticeDTO source);

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
package it.gov.pagopa.arc.dto.mapper.pullpayment;

import it.gov.pagopa.arc.connector.pullpayment.dto.PullPaymentOptionDTO;
import it.gov.pagopa.arc.dto.mapper.MapperUtilities;
import it.gov.pagopa.arc.model.generated.PaymentOptionDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.NullValueCheckStrategy;

@Mapper(componentModel = "spring", uses = PullPaymentInstallmentDTO2InstallmentDTOMapper.class)
@Mapper(componentModel = "spring", uses = {PullPaymentInstallmentDTO2InstallmentDTOMapper.class, MapperUtilities.class})
public interface PullPaymentOptionDTO2PaymentOptionDTOMapper {
@Mapping(source = "dueDate", target = "dueDate", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, qualifiedByName = "convertToZonedDateTimeAndTruncateSeconds")
PaymentOptionDTO toPaymentOptionDTO(PullPaymentOptionDTO pullPaymentOptionDTOSource);
}

0 comments on commit 87e539e

Please sign in to comment.