This repository contains the small square microservice that the restaurant creates, the dishes according to the category and the orders. In the database, the category is entered into the category table manually.
The implementation of this microservice begins with the creation of the restaurant that a user with the role of owner must have and the creation of a dish that belongs to a restaurant and that has an assigned category, update of the dish, security of the routes is added, the employee is created, the dish is enabled or disabled, all the restaurants are listed with pagination and the dishes are listed by category id and restaurant id by role consumer, @Setter private static Long idUser, make an order, list order by state, assign order to employee, update status order, notify order state ready, update state order to delivered and cancel order
It contains the connection with the relational database in MySql, for which the powerup name database must be created and
- JDK 17 https://jdk.java.net/java-se-ri/17
- Gradle https://gradle.org/install/
- MySQL https://dev.mysql.com/downloads/installer/
- IntelliJ Community https://www.jetbrains.com/idea/download/
- Postman https://www.postman.com/downloads/
To get a local copy up and running follow these steps:
-
Clone the repository
-
Create a database in MySql with the smallsquare
-
Update the credentials must be modified in the application-dev.yml file.
-
Run the microservice by right clicking on the UserMicroserviceApplication file and then on run
-
The port on which the microservice runs is 8080 which can be modified by entering the application-dev.yml file.
-
The documentation of the code is in the following link
- Create restaurant http://localhost:9080/swagger-ui/index.html# in your web browser
- Create plate
- Update plate
- Update state
- List all restaurantes
- List plates by restaurantId and categoryId
- Make an order by role consumer
- List orders by state
- Assing order and update state to preparation
- Notify order ready
- Update state order to delivered with code client
- Cancel order if state is earning
Right-click the test folder and choose Run tests with coverage:
@LilianaGallego - Liliana Gallego