Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.showcase.synapse.delivery
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.delivery
Commits
802a3849
Commit
802a3849
authored
Sep 11, 2023
by
lemin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delivery commit
parent
1e7782a2
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
100 additions
and
47 deletions
+100
-47
DeliveryAggregate.java
...howcase/synapse/delivery/aggregate/DeliveryAggregate.java
+13
-13
ChangeDeliveryStatusCommand.java
...synapse/delivery/command/ChangeDeliveryStatusCommand.java
+1
-1
CreateDeliveryCommand.java
...wcase/synapse/delivery/command/CreateDeliveryCommand.java
+1
-1
DeliveryController.java
...wcase/synapse/delivery/controller/DeliveryController.java
+9
-9
DeliveryCreateDto.java
.../com/showcase/synapse/delivery/dto/DeliveryCreateDto.java
+1
-1
DeliveryEntity.java
.../com/showcase/synapse/delivery/entity/DeliveryEntity.java
+1
-1
DeliveryStatus.java
...a/com/showcase/synapse/delivery/enums/DeliveryStatus.java
+1
-1
DeliveryCreatedEvent.java
...showcase/synapse/delivery/event/DeliveryCreatedEvent.java
+1
-1
DeliveryQuantityChangedEvent.java
.../synapse/delivery/event/DeliveryQuantityChangedEvent.java
+1
-1
DeliveryEventHandler.java
.../synapse/delivery/event/handler/DeliveryEventHandler.java
+45
-0
GetDeliveryQuery.java
...com/showcase/synapse/delivery/query/GetDeliveryQuery.java
+1
-1
DeliveryQueryHandler.java
.../synapse/delivery/query/handler/DeliveryQueryHandler.java
+6
-6
DeliveryRepository.java
...wcase/synapse/delivery/repository/DeliveryRepository.java
+8
-0
DeliverySaga.java
...java/com/showcase/synapse/delivery/saga/DeliverySaga.java
+1
-1
DeliveryService.java
...om/showcase/synapse/delivery/service/DeliveryService.java
+10
-10
No files found.
src/main/java/com/showcase/synapse/delivery/aggregate/
Product
Aggregate.java
→
src/main/java/com/showcase/synapse/delivery/aggregate/
Delivery
Aggregate.java
View file @
802a3849
...
@@ -8,11 +8,11 @@ import org.axonframework.eventsourcing.EventSourcingHandler;
...
@@ -8,11 +8,11 @@ import org.axonframework.eventsourcing.EventSourcingHandler;
import
org.axonframework.modelling.command.AggregateIdentifier
;
import
org.axonframework.modelling.command.AggregateIdentifier
;
import
org.axonframework.spring.stereotype.Aggregate
;
import
org.axonframework.spring.stereotype.Aggregate
;
import
com.showcase.synapse.delivery.command.Change
Quantity
Command
;
import
com.showcase.synapse.delivery.command.Change
DeliveryStatus
Command
;
import
com.showcase.synapse.delivery.command.Create
Product
Command
;
import
com.showcase.synapse.delivery.command.Create
Delivery
Command
;
import
com.showcase.synapse.delivery.event.
Product
CreatedEvent
;
import
com.showcase.synapse.delivery.event.
Delivery
CreatedEvent
;
import
com.showcase.synapse.delivery.event.
Product
QuantityChangedEvent
;
import
com.showcase.synapse.delivery.event.
Delivery
QuantityChangedEvent
;
import
com.showcase.synapse.delivery.saga.
Product
Saga
;
import
com.showcase.synapse.delivery.saga.
Delivery
Saga
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
@@ -21,7 +21,7 @@ import static org.axonframework.modelling.command.AggregateLifecycle.apply;
...
@@ -21,7 +21,7 @@ import static org.axonframework.modelling.command.AggregateLifecycle.apply;
@Aggregate
@Aggregate
@NoArgsConstructor
@NoArgsConstructor
@Slf4j
@Slf4j
public
class
Product
Aggregate
{
public
class
Delivery
Aggregate
{
@AggregateIdentifier
@AggregateIdentifier
private
String
id
;
private
String
id
;
...
@@ -29,26 +29,26 @@ public class ProductAggregate {
...
@@ -29,26 +29,26 @@ public class ProductAggregate {
@CommandHandler
@CommandHandler
public
ProductAggregate
(
CreateProduct
Command
command
)
{
public
DeliveryAggregate
(
CreateDelivery
Command
command
)
{
log
.
info
(
"[
ProductAggregate(CreateProductCommand) > apply new Product
CreatedEvent]"
);
log
.
info
(
"[
DeliveryAggregate(CreateDeliveryCommand) > apply new Delivery
CreatedEvent]"
);
apply
(
new
Product
CreatedEvent
(
command
.
getId
(),
command
.
getName
(),
command
.
getComment
(),
command
.
getPrice
()));
apply
(
new
Delivery
CreatedEvent
(
command
.
getId
(),
command
.
getName
(),
command
.
getComment
(),
command
.
getPrice
()));
}
}
@EventSourcingHandler
@EventSourcingHandler
public
void
createProduct
(
Product
CreatedEvent
event
)
{
public
void
createProduct
(
Delivery
CreatedEvent
event
)
{
this
.
id
=
event
.
getProductId
();
this
.
id
=
event
.
getProductId
();
// this.quantiy = event.getQuantity();
// this.quantiy = event.getQuantity();
}
}
@CommandHandler
@CommandHandler
public
void
changeQuantity
(
Change
Quantity
Command
command
)
{
public
void
changeQuantity
(
Change
DeliveryStatus
Command
command
)
{
log
.
info
(
"[@CommandHandler ProductchangeQuantity]"
);
log
.
info
(
"[@CommandHandler ProductchangeQuantity]"
);
// if(this.quantiy < command.getQuantity()) throw new IllegalArgumentException("tfy ");
// if(this.quantiy < command.getQuantity()) throw new IllegalArgumentException("tfy ");
// apply(new
Product
QuantityChangedEvent(command.getProductId(), this.quantiy - command.getQuantity()));
// apply(new
Delivery
QuantityChangedEvent(command.getProductId(), this.quantiy - command.getQuantity()));
}
}
@EventSourcingHandler
@EventSourcingHandler
public
void
changeQuantity
(
Product
QuantityChangedEvent
event
)
{
public
void
changeQuantity
(
Delivery
QuantityChangedEvent
event
)
{
// this.quantiy = event.getQuantity();
// this.quantiy = event.getQuantity();
}
}
...
...
src/main/java/com/showcase/synapse/delivery/command/Change
Quantity
Command.java
→
src/main/java/com/showcase/synapse/delivery/command/Change
DeliveryStatus
Command.java
View file @
802a3849
...
@@ -7,7 +7,7 @@ import lombok.Getter;
...
@@ -7,7 +7,7 @@ import lombok.Getter;
@AllArgsConstructor
@AllArgsConstructor
@Getter
@Getter
public
class
Change
Quantity
Command
{
public
class
Change
DeliveryStatus
Command
{
@TargetAggregateIdentifier
@TargetAggregateIdentifier
private
String
productId
;
private
String
productId
;
...
...
src/main/java/com/showcase/synapse/delivery/command/Create
Product
Command.java
→
src/main/java/com/showcase/synapse/delivery/command/Create
Delivery
Command.java
View file @
802a3849
...
@@ -8,7 +8,7 @@ import java.math.BigDecimal;
...
@@ -8,7 +8,7 @@ import java.math.BigDecimal;
@AllArgsConstructor
@AllArgsConstructor
@Getter
@Getter
public
class
Create
Product
Command
{
public
class
Create
Delivery
Command
{
@TargetAggregateIdentifier
@TargetAggregateIdentifier
private
final
String
id
;
private
final
String
id
;
...
...
src/main/java/com/showcase/synapse/delivery/controller/
Product
Controller.java
→
src/main/java/com/showcase/synapse/delivery/controller/
Delivery
Controller.java
View file @
802a3849
...
@@ -3,9 +3,9 @@ package com.showcase.synapse.delivery.controller;
...
@@ -3,9 +3,9 @@ package com.showcase.synapse.delivery.controller;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.showcase.synapse.delivery.dto.
Product
CreateDto
;
import
com.showcase.synapse.delivery.dto.
Delivery
CreateDto
;
import
com.showcase.synapse.delivery.entity.
Product
Entity
;
import
com.showcase.synapse.delivery.entity.
Delivery
Entity
;
import
com.showcase.synapse.delivery.service.
Product
Service
;
import
com.showcase.synapse.delivery.service.
Delivery
Service
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -16,23 +16,23 @@ import java.util.concurrent.ExecutionException;
...
@@ -16,23 +16,23 @@ import java.util.concurrent.ExecutionException;
@RestController
@RestController
@RequestMapping
(
"/api/msa/product"
)
@RequestMapping
(
"/api/msa/product"
)
@CrossOrigin
(
origins
=
"*"
)
@CrossOrigin
(
origins
=
"*"
)
public
class
Product
Controller
{
public
class
Delivery
Controller
{
final
Product
Service
productService
;
final
Delivery
Service
productService
;
public
ProductController
(
Product
Service
productService
)
{
public
DeliveryController
(
Delivery
Service
productService
)
{
this
.
productService
=
productService
;
this
.
productService
=
productService
;
}
}
@GetMapping
(
"/"
)
@GetMapping
(
"/"
)
public
ResponseEntity
<
List
<
Product
Entity
>>
getProducts
()
throws
ExecutionException
,
InterruptedException
{
public
ResponseEntity
<
List
<
Delivery
Entity
>>
getProducts
()
throws
ExecutionException
,
InterruptedException
{
List
<
Product
Entity
>
productEntities
=
productService
.
getProducts
();
List
<
Delivery
Entity
>
productEntities
=
productService
.
getProducts
();
return
ResponseEntity
.
ok
(
productEntities
);
return
ResponseEntity
.
ok
(
productEntities
);
}
}
@PostMapping
(
"/"
)
@PostMapping
(
"/"
)
public
ResponseEntity
<
Map
<
String
,
String
>>
productCreate
(
@RequestBody
Product
CreateDto
productCreateDto
)
{
public
ResponseEntity
<
Map
<
String
,
String
>>
productCreate
(
@RequestBody
Delivery
CreateDto
productCreateDto
)
{
String
productId
=
productService
.
createProduct
(
productCreateDto
.
getName
(),
String
productId
=
productService
.
createProduct
(
productCreateDto
.
getName
(),
productCreateDto
.
getComment
(),
productCreateDto
.
getComment
(),
BigDecimal
.
valueOf
(
productCreateDto
.
getPrice
()));
BigDecimal
.
valueOf
(
productCreateDto
.
getPrice
()));
...
...
src/main/java/com/showcase/synapse/delivery/dto/
Product
CreateDto.java
→
src/main/java/com/showcase/synapse/delivery/dto/
Delivery
CreateDto.java
View file @
802a3849
...
@@ -5,7 +5,7 @@ import lombok.Setter;
...
@@ -5,7 +5,7 @@ import lombok.Setter;
@Getter
@Getter
@Setter
@Setter
public
class
Product
CreateDto
{
public
class
Delivery
CreateDto
{
private
String
name
;
private
String
name
;
private
String
comment
;
private
String
comment
;
private
int
price
;
private
int
price
;
...
...
src/main/java/com/showcase/synapse/delivery/entity/
Product
Entity.java
→
src/main/java/com/showcase/synapse/delivery/entity/
Delivery
Entity.java
View file @
802a3849
...
@@ -14,7 +14,7 @@ import java.math.BigDecimal;
...
@@ -14,7 +14,7 @@ import java.math.BigDecimal;
@Setter
@Setter
@AllArgsConstructor
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor
public
class
Product
Entity
{
public
class
Delivery
Entity
{
@Id
@Id
private
String
id
;
private
String
id
;
private
String
name
;
private
String
name
;
...
...
src/main/java/com/showcase/synapse/delivery/enums/
Order
Status.java
→
src/main/java/com/showcase/synapse/delivery/enums/
Delivery
Status.java
View file @
802a3849
package
com
.
showcase
.
synapse
.
delivery
.
enums
;
package
com
.
showcase
.
synapse
.
delivery
.
enums
;
public
enum
Order
Status
{
public
enum
Delivery
Status
{
CREATED
,
CANCELED
CREATED
,
CANCELED
}
}
src/main/java/com/showcase/synapse/delivery/event/
Product
CreatedEvent.java
→
src/main/java/com/showcase/synapse/delivery/event/
Delivery
CreatedEvent.java
View file @
802a3849
...
@@ -7,7 +7,7 @@ import java.math.BigDecimal;
...
@@ -7,7 +7,7 @@ import java.math.BigDecimal;
@AllArgsConstructor
@AllArgsConstructor
@Getter
@Getter
public
class
Product
CreatedEvent
{
public
class
Delivery
CreatedEvent
{
private
String
productId
;
private
String
productId
;
private
String
name
;
private
String
name
;
private
String
comment
;
private
String
comment
;
...
...
src/main/java/com/showcase/synapse/delivery/event/
Product
QuantityChangedEvent.java
→
src/main/java/com/showcase/synapse/delivery/event/
Delivery
QuantityChangedEvent.java
View file @
802a3849
...
@@ -5,7 +5,7 @@ import lombok.Getter;
...
@@ -5,7 +5,7 @@ import lombok.Getter;
@AllArgsConstructor
@AllArgsConstructor
@Getter
@Getter
public
class
Product
QuantityChangedEvent
{
public
class
Delivery
QuantityChangedEvent
{
private
String
productId
;
private
String
productId
;
private
int
quantity
;
private
int
quantity
;
}
}
src/main/java/com/showcase/synapse/delivery/event/handler/
Product
EventHandler.java
→
src/main/java/com/showcase/synapse/delivery/event/handler/
Delivery
EventHandler.java
View file @
802a3849
...
@@ -5,24 +5,24 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -5,24 +5,24 @@ import lombok.extern.slf4j.Slf4j;
import
org.axonframework.eventhandling.EventHandler
;
import
org.axonframework.eventhandling.EventHandler
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
com.showcase.synapse.delivery.entity.
Product
Entity
;
import
com.showcase.synapse.delivery.entity.
Delivery
Entity
;
import
com.showcase.synapse.delivery.event.
Product
CreatedEvent
;
import
com.showcase.synapse.delivery.event.
Delivery
CreatedEvent
;
import
com.showcase.synapse.delivery.event.
Product
QuantityChangedEvent
;
import
com.showcase.synapse.delivery.event.
Delivery
QuantityChangedEvent
;
import
com.showcase.synapse.delivery.repository.
Product
Repository
;
import
com.showcase.synapse.delivery.repository.
Delivery
Repository
;
@Component
@Component
@AllArgsConstructor
@AllArgsConstructor
@Slf4j
@Slf4j
public
class
Product
EventHandler
{
public
class
Delivery
EventHandler
{
private
final
Product
Repository
productRepository
;
private
final
Delivery
Repository
productRepository
;
@EventHandler
@EventHandler
protected
void
saveProduct
(
Product
CreatedEvent
productCreatedEvent
)
{
protected
void
saveProduct
(
Delivery
CreatedEvent
productCreatedEvent
)
{
log
.
info
(
"
Product
CreatedEvent 이벤트 받음?"
);
log
.
info
(
"
Delivery
CreatedEvent 이벤트 받음?"
);
log
.
info
(
"
ProductEventHandler > [Product
CreatedEvent] productCreatedEvent"
);
log
.
info
(
"
DeliveryEventHandler > [Delivery
CreatedEvent] productCreatedEvent"
);
ProductEntity
productEntity
=
new
Product
Entity
();
DeliveryEntity
productEntity
=
new
Delivery
Entity
();
productEntity
.
setId
(
productCreatedEvent
.
getProductId
());
productEntity
.
setId
(
productCreatedEvent
.
getProductId
());
productEntity
.
setName
(
productCreatedEvent
.
getName
());
productEntity
.
setName
(
productCreatedEvent
.
getName
());
productEntity
.
setComment
(
productCreatedEvent
.
getComment
());
productEntity
.
setComment
(
productCreatedEvent
.
getComment
());
...
@@ -33,10 +33,10 @@ public class ProductEventHandler {
...
@@ -33,10 +33,10 @@ public class ProductEventHandler {
}
}
@EventHandler
@EventHandler
protected
void
changeQuantity
(
Product
QuantityChangedEvent
productQuantityChangedEvent
)
{
protected
void
changeQuantity
(
Delivery
QuantityChangedEvent
productQuantityChangedEvent
)
{
log
.
info
(
"
Product
QuantityChangedEvent 이벤트 받음?"
);
log
.
info
(
"
Delivery
QuantityChangedEvent 이벤트 받음?"
);
log
.
info
(
"[
Product
QuantityChangedEvent]"
);
log
.
info
(
"[
Delivery
QuantityChangedEvent]"
);
Product
Entity
productEntity
=
productRepository
.
findById
(
productQuantityChangedEvent
.
getProductId
()).
get
();
Delivery
Entity
productEntity
=
productRepository
.
findById
(
productQuantityChangedEvent
.
getProductId
()).
get
();
// log.info("[{}] quantity:{}", productEntity.getName(), productEntity.getQuentity());
// log.info("[{}] quantity:{}", productEntity.getName(), productEntity.getQuentity());
// productEntity.setQuentity(productQuantityChangedEvent.getQuantity());
// productEntity.setQuentity(productQuantityChangedEvent.getQuantity());
productRepository
.
save
(
productEntity
);
productRepository
.
save
(
productEntity
);
...
...
src/main/java/com/showcase/synapse/delivery/query/Get
Products
Query.java
→
src/main/java/com/showcase/synapse/delivery/query/Get
Delivery
Query.java
View file @
802a3849
package
com
.
showcase
.
synapse
.
delivery
.
query
;
package
com
.
showcase
.
synapse
.
delivery
.
query
;
public
class
Get
Products
Query
{
public
class
Get
Delivery
Query
{
}
}
src/main/java/com/showcase/synapse/delivery/query/handler/
Product
QueryHandler.java
→
src/main/java/com/showcase/synapse/delivery/query/handler/
Delivery
QueryHandler.java
View file @
802a3849
...
@@ -5,9 +5,9 @@ import java.util.List;
...
@@ -5,9 +5,9 @@ import java.util.List;
import
org.axonframework.queryhandling.QueryHandler
;
import
org.axonframework.queryhandling.QueryHandler
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
com.showcase.synapse.delivery.entity.
Product
Entity
;
import
com.showcase.synapse.delivery.entity.
Delivery
Entity
;
import
com.showcase.synapse.delivery.query.Get
Products
Query
;
import
com.showcase.synapse.delivery.query.Get
Delivery
Query
;
import
com.showcase.synapse.delivery.repository.
Product
Repository
;
import
com.showcase.synapse.delivery.repository.
Delivery
Repository
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -15,12 +15,12 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -15,12 +15,12 @@ import lombok.extern.slf4j.Slf4j;
@Component
@Component
@RequiredArgsConstructor
@RequiredArgsConstructor
@Slf4j
@Slf4j
public
class
Product
QueryHandler
{
public
class
Delivery
QueryHandler
{
private
final
Product
Repository
productRepository
;
private
final
Delivery
Repository
productRepository
;
@QueryHandler
@QueryHandler
protected
List
<
ProductEntity
>
on
(
GetProducts
Query
query
)
{
protected
List
<
DeliveryEntity
>
on
(
GetDelivery
Query
query
)
{
log
.
info
(
"---product query---"
);
log
.
info
(
"---product query---"
);
return
productRepository
.
findAll
();
return
productRepository
.
findAll
();
}
}
...
...
src/main/java/com/showcase/synapse/delivery/repository/
Product
Repository.java
→
src/main/java/com/showcase/synapse/delivery/repository/
Delivery
Repository.java
View file @
802a3849
package
com
.
showcase
.
synapse
.
delivery
.
repository
;
package
com
.
showcase
.
synapse
.
delivery
.
repository
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
com.showcase.synapse.delivery.entity.
Product
Entity
;
import
com.showcase.synapse.delivery.entity.
Delivery
Entity
;
public
interface
ProductRepository
extends
JpaRepository
<
Product
Entity
,
String
>
{
public
interface
DeliveryRepository
extends
JpaRepository
<
Delivery
Entity
,
String
>
{
}
}
src/main/java/com/showcase/synapse/delivery/saga/
Product
Saga.java
→
src/main/java/com/showcase/synapse/delivery/saga/
Delivery
Saga.java
View file @
802a3849
...
@@ -8,7 +8,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -8,7 +8,7 @@ import lombok.extern.slf4j.Slf4j;
//@Saga
//@Saga
@Slf4j
@Slf4j
public
class
Product
Saga
{
public
class
Delivery
Saga
{
@Autowired
@Autowired
private
transient
CommandGateway
commandGateway
;
private
transient
CommandGateway
commandGateway
;
...
...
src/main/java/com/showcase/synapse/delivery/service/
Product
Service.java
→
src/main/java/com/showcase/synapse/delivery/service/
Delivery
Service.java
View file @
802a3849
...
@@ -10,28 +10,28 @@ import org.axonframework.messaging.responsetypes.ResponseTypes;
...
@@ -10,28 +10,28 @@ import org.axonframework.messaging.responsetypes.ResponseTypes;
import
org.axonframework.queryhandling.QueryGateway
;
import
org.axonframework.queryhandling.QueryGateway
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.showcase.synapse.delivery.command.Create
Product
Command
;
import
com.showcase.synapse.delivery.command.Create
Delivery
Command
;
import
com.showcase.synapse.delivery.entity.
Product
Entity
;
import
com.showcase.synapse.delivery.entity.
Delivery
Entity
;
import
com.showcase.synapse.delivery.query.Get
Products
Query
;
import
com.showcase.synapse.delivery.query.Get
Delivery
Query
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
@Slf4j
@Slf4j
@Service
@Service
public
class
Product
Service
{
public
class
Delivery
Service
{
private
final
CommandGateway
commandGateway
;
private
final
CommandGateway
commandGateway
;
private
final
QueryGateway
queryGateway
;
private
final
QueryGateway
queryGateway
;
public
Product
Service
(
CommandGateway
commandGateway
,
QueryGateway
queryGateway
)
{
public
Delivery
Service
(
CommandGateway
commandGateway
,
QueryGateway
queryGateway
)
{
this
.
commandGateway
=
commandGateway
;
this
.
commandGateway
=
commandGateway
;
this
.
queryGateway
=
queryGateway
;
this
.
queryGateway
=
queryGateway
;
}
}
public
String
createProduct
(
String
name
,
String
comment
,
BigDecimal
price
)
{
public
String
createProduct
(
String
name
,
String
comment
,
BigDecimal
price
)
{
log
.
info
(
"[@Service createProduct] new Create
Product
Command"
);
log
.
info
(
"[@Service createProduct] new Create
Delivery
Command"
);
// command생성
// command생성
Create
ProductCommand
createProductCommand
=
new
CreateProduct
Command
(
Create
DeliveryCommand
createProductCommand
=
new
CreateDelivery
Command
(
UUID
.
randomUUID
().
toString
(),
name
,
comment
,
price
UUID
.
randomUUID
().
toString
(),
name
,
comment
,
price
);
);
System
.
out
.
println
(
"test"
);
System
.
out
.
println
(
"test"
);
...
@@ -42,9 +42,9 @@ public class ProductService {
...
@@ -42,9 +42,9 @@ public class ProductService {
return
returnValue
;
return
returnValue
;
}
}
public
List
<
Product
Entity
>
getProducts
()
throws
ExecutionException
,
InterruptedException
{
public
List
<
Delivery
Entity
>
getProducts
()
throws
ExecutionException
,
InterruptedException
{
return
queryGateway
.
query
(
new
Get
Products
Query
(),
return
queryGateway
.
query
(
new
Get
Delivery
Query
(),
ResponseTypes
.
multipleInstancesOf
(
Product
Entity
.
class
)).
get
();
ResponseTypes
.
multipleInstancesOf
(
Delivery
Entity
.
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