Created
May 15, 2019 18:59
-
-
Save sohangp/771168517aff5c9e98089e6acb99a443 to your computer and use it in GitHub Desktop.
Another component called for Object creation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
public class MapperUtility { | |
public CustomerOrderDTO buildOrderDTO(Long orderNumber, Double totalAmount) { | |
CustomerOrderDTO customerOrderDTO = null; | |
if (orderNumber != null) { | |
customerOrderDTO = new CustomerOrderDTO(); | |
customerOrderDTO.setOrderNumber(orderNumber); | |
customerOrderDTO.setTotalAmount("$" + totalAmount); | |
} | |
return customerOrderDTO; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment