Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Conversation

@gustaavik
Copy link
Member

This pull request includes several changes to the order management system, focusing on separating the totalAmount into subTotal and shippingCost across various parts of the codebase. The most important changes include updates to the data models, APIs, services, and tests to accommodate this new structure.

Data Model Changes:

  • OrderEntity.java: Renamed totalAmount to subTotal and added shippingCost, along with a new method getTotal() to compute the total amount. [1] [2]
  • OrderDTO.java: Updated fields to include subTotal and shippingCost, and added a getTotal() method.

API Changes:

Service Changes:

  • OrderService.java: Updated order creation logic to handle subTotal and shippingCost.
  • MobilePayService.java and StripeService.java: Modified to use the new getTotal() method. [1] [2] [3]

Database Changes:

  • db.changelog-master.xml and 250115175031-changelog.xml: Added migration scripts to rename total_amount to sub_total and add shipping_cost column. [1] [2]

Test Changes:

  • Updated various test files to reflect the new structure and added tests for the new getTotal() method. [1] [2] [3] [4] [5] [6] [7] [8] [9]

@gustaavik gustaavik merged commit 712f23c into main Jan 15, 2025
1 check passed
@gustaavik gustaavik deleted the adding-shipping-cost-to-orders branch January 15, 2025 17:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants