Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.showcase.synapse.wms
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.wms
Commits
b7e54815
Commit
b7e54815
authored
Sep 12, 2023
by
lemin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
c0eed78e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
WMSController.java
...va/com/showcase/synapse/wms/controller/WMSController.java
+12
-12
InventoryService.java
...va/com/showcase/synapse/wms/service/InventoryService.java
+1
-1
No files found.
src/main/java/com/showcase/synapse/wms/controller/WMSController.java
View file @
b7e54815
...
...
@@ -14,31 +14,31 @@ import java.util.Map;
import
java.util.concurrent.ExecutionException
;
@RestController
@RequestMapping
(
"/api/msa/
product
"
)
@RequestMapping
(
"/api/msa/
wms
"
)
@CrossOrigin
(
origins
=
"*"
)
public
class
WMSController
{
final
InventoryService
product
Service
;
final
InventoryService
inventory
Service
;
public
WMSController
(
InventoryService
product
Service
)
{
this
.
productService
=
product
Service
;
public
WMSController
(
InventoryService
inventory
Service
)
{
this
.
inventoryService
=
inventory
Service
;
}
@GetMapping
(
"/"
)
public
ResponseEntity
<
List
<
InventoryEntity
>>
getProducts
()
throws
ExecutionException
,
InterruptedException
{
List
<
InventoryEntity
>
productEntities
=
product
Service
.
getProducts
();
return
ResponseEntity
.
ok
(
product
Entities
);
List
<
InventoryEntity
>
inventoryEntities
=
inventory
Service
.
getProducts
();
return
ResponseEntity
.
ok
(
inventory
Entities
);
}
@PostMapping
(
"/"
)
public
ResponseEntity
<
Map
<
String
,
String
>>
productCreate
(
@RequestBody
InventoryCreateDto
product
CreateDto
)
{
String
productId
=
productService
.
createProduct
(
product
CreateDto
.
getName
(),
product
CreateDto
.
getComment
(),
BigDecimal
.
valueOf
(
product
CreateDto
.
getPrice
()));
public
ResponseEntity
<
Map
<
String
,
String
>>
inventoryCreate
(
@RequestBody
InventoryCreateDto
inventory
CreateDto
)
{
String
inventoryId
=
inventoryService
.
createInventory
(
inventory
CreateDto
.
getName
(),
inventory
CreateDto
.
getComment
(),
BigDecimal
.
valueOf
(
inventory
CreateDto
.
getPrice
()));
HashMap
<
String
,
String
>
m
=
new
HashMap
<>();
m
.
put
(
"
productId"
,
product
Id
);
m
.
put
(
"productName"
,
product
CreateDto
.
getName
());
m
.
put
(
"
inventoryId"
,
inventory
Id
);
m
.
put
(
"productName"
,
inventory
CreateDto
.
getName
());
return
ResponseEntity
.
ok
(
m
);
}
...
...
src/main/java/com/showcase/synapse/wms/service/InventoryService.java
View file @
b7e54815
...
...
@@ -28,7 +28,7 @@ public class InventoryService {
this
.
queryGateway
=
queryGateway
;
}
public
String
create
Product
(
String
name
,
String
comment
,
BigDecimal
price
)
{
public
String
create
Inventory
(
String
name
,
String
comment
,
BigDecimal
price
)
{
log
.
info
(
"[@Service createProduct] new CreateInventoryCommand"
);
// command생성
CreateInventoryCommand
createProductCommand
=
new
CreateInventoryCommand
(
...
...
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