Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.showcase.synapse.sales
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
com.showcase.synapse
com.showcase.synapse.sales
Commits
651a2112
Commit
651a2112
authored
Sep 13, 2023
by
lemin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
cd37e104
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
GetProductsQuery.java
...va/com/showcase/synapse/sales/query/GetProductsQuery.java
+4
-0
SalesQueryHandler.java
...owcase/synapse/sales/query/handler/SalesQueryHandler.java
+2
-1
SalesService.java
...java/com/showcase/synapse/sales/service/SalesService.java
+2
-1
No files found.
src/main/java/com/showcase/synapse/sales/query/GetProductsQuery.java
0 → 100644
View file @
651a2112
package
com
.
showcase
.
synapse
.
sales
.
query
;
public
class
GetProductsQuery
{
}
src/main/java/com/showcase/synapse/sales/query/handler/SalesQueryHandler.java
View file @
651a2112
...
...
@@ -7,6 +7,7 @@ import org.springframework.stereotype.Component;
import
com.showcase.synapse.sales.entity.ProductEntity
;
import
com.showcase.synapse.sales.entity.SalesEntity
;
import
com.showcase.synapse.sales.query.GetProductsQuery
;
import
com.showcase.synapse.sales.query.GetSalesQuery
;
import
com.showcase.synapse.sales.repository.ProductRepository
;
import
com.showcase.synapse.sales.repository.SalesRepository
;
...
...
@@ -29,7 +30,7 @@ public class SalesQueryHandler {
}
@QueryHandler
protected
List
<
ProductEntity
>
getProducts
(
Get
Sale
sQuery
query
)
{
protected
List
<
ProductEntity
>
getProducts
(
Get
Product
sQuery
query
)
{
log
.
info
(
"---getProducts query---"
);
return
productRepository
.
findAll
();
}
...
...
src/main/java/com/showcase/synapse/sales/service/SalesService.java
View file @
651a2112
...
...
@@ -13,6 +13,7 @@ import org.springframework.stereotype.Service;
import
com.showcase.synapse.sales.command.CreateSalesCommand
;
import
com.showcase.synapse.sales.entity.ProductEntity
;
import
com.showcase.synapse.sales.entity.SalesEntity
;
import
com.showcase.synapse.sales.query.GetProductsQuery
;
import
com.showcase.synapse.sales.query.GetSalesQuery
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -44,7 +45,7 @@ public class SalesService {
}
public
List
<
ProductEntity
>
getProducts
()
throws
ExecutionException
,
InterruptedException
{
return
queryGateway
.
query
(
new
Get
Sale
sQuery
(),
return
queryGateway
.
query
(
new
Get
Product
sQuery
(),
ResponseTypes
.
multipleInstancesOf
(
ProductEntity
.
class
)).
get
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment