Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
ef37ba32
Commit
ef37ba32
authored
Mar 17, 2021
by
chongfu.liang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加价购fix
parent
b8e7f4b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
shopping-cart-application-service/src/main/java/cn/freemud/demo/controller/ShoppingCartDemoController.java
+14
-0
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/demo/controller/ShoppingCartDemoController.java
View file @
ef37ba32
...
@@ -50,6 +50,7 @@ import io.swagger.annotations.Api;
...
@@ -50,6 +50,7 @@ import io.swagger.annotations.Api;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
ma.glasnost.orika.MapperFacade
;
import
ma.glasnost.orika.MapperFacade
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
...
@@ -60,6 +61,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -60,6 +61,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
@RestController
@RestController
...
@@ -161,7 +163,19 @@ public class ShoppingCartDemoController {
...
@@ -161,7 +163,19 @@ public class ShoppingCartDemoController {
@PostMapping
(
value
=
"/listCartGoods"
)
@PostMapping
(
value
=
"/listCartGoods"
)
public
BaseResponse
listCartGoods
(
@LogParams
@RequestBody
Map
<
String
,
Object
>
request
)
{
public
BaseResponse
listCartGoods
(
@LogParams
@RequestBody
Map
<
String
,
Object
>
request
)
{
/**
* 这里是为了兼容老入口,老入口不用之后,这里可以直接删掉
*/
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>
sendGoods
=
(
List
<
ShoppingCartInfoRequestVo
.
SendGoods
>)
request
.
get
(
"sendGoods"
);
/**
* 这里是为了兼容老入口,老入口不用之后,这里可以直接删掉
*/
ListCartGoodsRequestDTO
baseRequestDTO
=
mapperFacade
.
map
(
request
,
ListCartGoodsRequestDTO
.
class
);
ListCartGoodsRequestDTO
baseRequestDTO
=
mapperFacade
.
map
(
request
,
ListCartGoodsRequestDTO
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
sendGoods
)){
List
<
ListCartGoodsRequestDTO
.
SendGoods
>
newSendGoods
=
mapperFacade
.
mapAsList
(
sendGoods
,
ListCartGoodsRequestDTO
.
SendGoods
.
class
);
baseRequestDTO
.
setSendGoods
(
newSendGoods
);
}
/**
/**
* 是否用新字段,还是沿用老逻辑
* 是否用新字段,还是沿用老逻辑
*/
*/
...
...
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