This repository was archived by the owner on Jul 6, 2025. It is now read-only.
adding new field to OrderDTO to hold orderLinesAmount #79
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes changes to the
OrderDTO,OrderMapper,OrderViewModel, and associated test files to enhance data consistency and add new functionality for handling order lines. The most important changes include updating data types, adding a new field for order lines amount, and implementing comprehensive tests for theOrderMapper.Data Type Updates:
src/main/java/com/zenfulcode/commercify/commercify/dto/OrderDTO.java: ChangedidandtotalAmountfromLongandDoubletolonganddoublerespectively. AddedorderLinesAmountfield.src/main/java/com/zenfulcode/commercify/commercify/viewmodel/OrderViewModel.java: ChangedidandtotalPricefromLongandDoubletolonganddoublerespectively. AddedorderLinesAmountfield.Handling Null Values:
src/main/java/com/zenfulcode/commercify/commercify/dto/mapper/OrderMapper.java: Updatedapplymethod to handle null values forcurrency,totalAmount, andorderLines.ViewModel Updates:
src/main/java/com/zenfulcode/commercify/commercify/viewmodel/OrderViewModel.java: UpdatedfromDTOmethod to includeorderLinesAmount.Testing Enhancements:
src/test/java/com/zenfulcode/commercify/commercify/dto/mapper/OrderMapperTest.java: Added comprehensive tests forOrderMapperto verify correct mapping and handling of null values.adding tests for OrderMapper