This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from 7SOATSquad30/feat/add-list-orders-specifi…
…c-statuses feat: add list orders specific statuses
- Loading branch information
Showing
9 changed files
with
85 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...om/fiap/grupo30/fastfood/domain/usecases/order/ListOrdersWithSpecificStatusesUseCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package br.com.fiap.grupo30.fastfood.domain.usecases.order; | ||
|
||
import br.com.fiap.grupo30.fastfood.domain.entities.Order; | ||
import br.com.fiap.grupo30.fastfood.infrastructure.gateways.OrderGateway; | ||
import br.com.fiap.grupo30.fastfood.presentation.presenters.dto.OrderDTO; | ||
import java.util.List; | ||
|
||
public class ListOrdersWithSpecificStatusesUseCase { | ||
|
||
private final OrderGateway orderGateway; | ||
|
||
public ListOrdersWithSpecificStatusesUseCase(OrderGateway orderGateway) { | ||
this.orderGateway = orderGateway; | ||
} | ||
|
||
public List<OrderDTO> execute() { | ||
return orderGateway.findOrdersWithSpecificStatuses().stream().map(Order::toDTO).toList(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters