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
451a5627
Commit
451a5627
authored
Apr 12, 2021
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
p6v3
parent
cee596f0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+7
-0
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/product/ProductAttributeValueType.java
+4
-0
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/product/ValidateSkuProductType.java
+6
-0
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
451a5627
...
...
@@ -563,6 +563,7 @@ public class ShoppingCartConvertAdapter {
public
List
<
ValidateSkuProductType
>
getValidateSkuProductType
(
List
<
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
ComboxGoods
>
productComboList
)
{
List
<
ValidateSkuProductType
>
result
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
productComboList
))
{
Map
<
String
,
ValidateSkuProductType
>
map
=
new
HashMap
<>();
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
ComboxGoods
comboxGoods
:
productComboList
)
{
if
(
"0"
.
equals
(
comboxGoods
.
getGoodsId
())){
continue
;
...
...
@@ -575,7 +576,13 @@ public class ShoppingCartConvertAdapter {
validateSkuProductType
.
setQty
(
comboxGoods
.
getQty
());
validateSkuProductType
.
setAttributeList
(
getAttributes
(
comboxGoods
.
getExtra
()));
validateSkuProductType
.
setProductGroupId
(
comboxGoods
.
getProductGroupId
());
ValidateSkuProductType
validateSkuProductTypeExists
=
map
.
get
(
validateSkuProductType
.
toString
());
if
(
validateSkuProductTypeExists
==
null
)
{
result
.
add
(
validateSkuProductType
);
map
.
put
(
validateSkuProductType
.
toString
(),
validateSkuProductType
);
}
else
{
validateSkuProductTypeExists
.
setQty
(
validateSkuProductTypeExists
.
getQty
()+
validateSkuProductType
.
getQty
());
}
}
}
return
result
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/product/ProductAttributeValueType.java
View file @
451a5627
...
...
@@ -20,4 +20,8 @@ public class ProductAttributeValueType {
private
String
attributeId
;
private
String
attributeValue
;
public
String
toString
()
{
return
"attributeId:"
+
attributeId
+
" attributeValue:"
+
attributeValue
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/product/ValidateSkuProductType.java
View file @
451a5627
...
...
@@ -29,4 +29,10 @@ public class ValidateSkuProductType {
private
ProductSpecAttrValueGroupType
productSpecAttrValueGroupType
;
public
String
toString
()
{
return
"skuId:"
+
skuId
+
" productId:"
+
productId
+
" price:"
+
price
+
" markUpPrice:"
+
markUpPrice
+
" qty:"
+
qty
+
" productGroupId:"
+
productGroupId
+
" attributeList:"
+
attributeList
.
toString
();
}
}
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