This is the first version of the "Awesome pizza" where customers can only place an order for a specific day, without the possibility to choose the hour. The orders are delivered in a FIFO (first in first out) criteria. There are 2 turn for each day, one for the lunch and one for the dinner. In each turn can be placed a limited number of pizza (parametric number in configuration).
User can insert a new order choosing a pizza in the catalog. There can be at most N number of orders in a day for a slot.
A scheduled task set the order in the status "in queue"
Employee set the order in the status "in progress"
Employee set the order in the status "order ready for pickup"
Employee set the order in the status "order completed"
Get the status of the order. Now the order request is cached for 1 second so if you try to do lot of request doesn't ask to db. In next version there could be a better design system like having websocket/ use firebase/some cloud event system.
User get the pizza informations like: name, ingredients and costs.
- Allow to specify a specific hour for orders
- Add documentation (swagger)
- Manage status hierarchy into database so also other application connected to it can undrestand
List<OrderItem> orderItemList = addOrderRequest.orderItemList().stream().map(el ->
orderItemMapper.requestToOrderItem(el, order)
).toList();
// to list immodificabile
// collection to list modificabile