Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
Orders
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Vladimir Trubachoff
Orders
Commits
0498ba10
Commit
0498ba10
authored
Jul 01, 2024
by
Vladimir Trubachoff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix goods controller
parent
7ca3937b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
GoodsController.java
...main/java/com/example/testj/web/rest/GoodsController.java
+4
-4
No files found.
src/main/java/com/example/testj/web/rest/GoodsController.java
View file @
0498ba10
...
...
@@ -54,10 +54,10 @@ public class GoodsController {
@PutMapping
(
"/{id}"
)
public
GoodsDto
updateGoods
(
@PathVariable
Long
id
,
@RequestBody
GoodsDto
goods
)
{
GoodsDto
updated
Order
=
goodsService
.
getGoods
(
id
);
updated
Order
.
setName
(
goods
.
getName
());
updated
Order
.
setPrice
(
goods
.
getPrice
());
return
updatedOrder
;
GoodsDto
updated
Goods
=
goodsService
.
getGoods
(
id
);
updated
Goods
.
setName
(
goods
.
getName
());
updated
Goods
.
setPrice
(
goods
.
getPrice
());
return
this
.
goodsService
.
createOrUpdate
(
mappingUtils
.
toGoods
(
updatedGoods
))
;
}
@DeleteMapping
(
"/{id}"
)
...
...
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