This module provides features for online purchase orders and management of message notifications based on various actions taken during order-related operations.
- Java Programming Language
- IntelliJ IDE for Java EE or VS Code with Spring Boot
- Spring Boot (with Spring Initializer)
- Application Server: Tomcat
- In-memory database (built-in technology or lists)
- Postman for testing the API
- Clone the Git repository.
- Open the project in IntelliJ IDE or VS Code.
- Ensure you have the correct Java version (Java JDK 11.0.16.1).
- Build and run the project.
- Test the API using Postman.
-
POST /api/customer/register
: Register a new user.- Request Body:
CustomerModel
- Response Body:
Response
- Request Body:
-
GET /api/customer/login/{name}/{password}
: Login user.- Path Variables:
name
,password
- Response Body:
Response
- Path Variables:
-
PUT /api/customer/addBalance/{name}/{amount}
: Add balance to a user account.- Path Variables:
name
,amount
- Response Body:
Response
- Path Variables:
GET /api/product/allProducts
: Get all products.
GET /api/customer/addToShoppingCart/{name}/{ProductSerial}/{amount}
: Add products to the shopping cart.- Path Variables:
name
,ProductSerial
,amount
- Response Body:
Response
- Path Variables:
-
POST /api/customer/order/simple
: Create a simple order.- Request Body:
OrderModel
- Response Body:
Response
- Request Body:
-
POST /api/customer/order/compound
: Create a compound order.- Request Body:
CompoundOrderModel
- Response Body:
Response
- Request Body:
-
GET /api/customer/order/details/{orderId}
: Get details of an order.- Path Variable:
orderId
- Response Body:
OrderDetailsModel
- Path Variable:
-
DELETE /api/customer/order/cancel/{orderId}
: Cancel an order.- Path Variable:
orderId
- Response Body:
Response
- Path Variable:
POST /api/customer/shipping/ship/{orderId}
: Ship an order.
- Path Variable:
orderId
- Response Body:
Response
-
POST /api/notification/create
: Create a notification.- Request Body:
NotificationModel
- Response Body:
Response
- Request Body:
-
GET /api/notification/queue
: Get the notification queue.- Response Body:
Queue<NotificationModel>
- Response Body:
-
POST /api/customer/order/cancel-auto/{orderId}
: Cancel an order automatically.- Path Variable:
orderId
- Response Body:
Response
- Path Variable:
-
GET /api/notification/liveStatistics
: Get live statistics.- Response Body:
StatisticModel
- Response Body:
- Fork the repository.
- Create a new branch for your feature.
- Make your changes and commit them.
- Push to the branch.
- Submit a pull request.