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
a10765ab
Commit
a10765ab
authored
Dec 15, 2020
by
孙昱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunyu::udpate::rollback
parent
74942a86
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
42 deletions
+6
-42
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+6
-42
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
a10765ab
...
...
@@ -717,48 +717,12 @@ public class ShoppingCartConvertAdapter {
comboxGoods
.
setTaxId
(
isComboxGoods
?
(
StringUtils
.
isNotEmpty
(
productComboType
.
getTaxId
())
?
productComboType
.
getTaxId
()
:
""
)
:
(
StringUtils
.
isNotEmpty
(
groupDetailType
.
getTaxId
())
?
groupDetailType
.
getTaxId
()
:
""
));
//2020/12/1
5 套餐内可选商品加料,暂无
//2020/12/1
0 套餐内可选商品加料
if
(
CollectionUtils
.
isNotEmpty
(
comboxGoods
.
getProductMaterialList
())){
if
(
CollectionUtils
.
isNotEmpty
(
parentProductBean
.
getAdditionalGroupList
()))
{
List
<
ProductTypeBeanDTO
.
ProductGroupType
.
GroupDetailType
>
groupDetail
=
new
ArrayList
<>();
for
(
ProductTypeBeanDTO
.
ProductGroupType
productGroupType
:
parentProductBean
.
getAdditionalGroupList
()){
groupDetail
.
addAll
(
productGroupType
.
getGroupDetail
());
}
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
MaterialGoods
productMaterial
:
comboxGoods
.
getProductMaterialList
()){
for
(
ProductTypeBeanDTO
.
ProductGroupType
.
GroupDetailType
productGroupType
:
groupDetail
){
if
(
productGroupType
.
getProductId
().
equals
(
productMaterial
.
getSpuId
())){
productMaterial
.
setSpuId
(
productGroupType
.
getProductId
());
productMaterial
.
setAmount
(
productGroupType
.
getProductFinalPrice
().
longValue
());
productMaterial
.
setFinalPrice
(
productGroupType
.
getProductFinalPrice
().
longValue
());
productMaterial
.
setOriginalAmount
(
productGroupType
.
getProductFinalPrice
().
longValue
());
productMaterial
.
setOriginalPrice
(
productGroupType
.
getProductFinalPrice
().
longValue
());
productMaterial
.
setSpuName
(
productGroupType
.
getProductName
());
}
}
}
}
else
{
if
(
CollectionUtils
.
isNotEmpty
(
parentProductBean
.
getAdditionalGroupList
())){
List
<
ProductTypeBeanDTO
.
ProductGroupType
.
GroupDetailType
>
groupDetail
=
new
ArrayList
<>();
for
(
ProductTypeBeanDTO
.
ProductGroupType
productGroupType
:
parentProductBean
.
getAdditionalGroupList
()){
groupDetail
.
addAll
(
productGroupType
.
getGroupDetail
());
}
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
MaterialGoods
productMaterial
:
comboxGoods
.
getProductMaterialList
()){
for
(
ProductTypeBeanDTO
.
ProductGroupType
.
GroupDetailType
productGroupType
:
groupDetail
){
if
(
productGroupType
.
getProductId
().
equals
(
productMaterial
.
getSpuId
())){
productMaterial
.
setSpuId
(
productGroupType
.
getProductId
());
productMaterial
.
setAmount
(
productGroupType
.
getProductFinalPrice
().
longValue
());
productMaterial
.
setFinalPrice
(
productGroupType
.
getProductFinalPrice
().
longValue
());
productMaterial
.
setOriginalAmount
(
productGroupType
.
getProductFinalPrice
().
longValue
());
productMaterial
.
setOriginalPrice
(
productGroupType
.
getProductFinalPrice
().
longValue
());
productMaterial
.
setSpuName
(
productGroupType
.
getProductName
());
}
}
}
}
else
{
//都不存在移除商品
comboxGoods
.
setProductMaterialList
(
new
ArrayList
<>());
}
}
List
<
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
MaterialGoods
>
productMaterialList
=
new
ArrayList
<>();
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
MaterialGoods
materialGoods
=
new
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
MaterialGoods
();
productMaterialList
.
add
(
materialGoods
);
comboxGoods
.
setProductMaterialList
(
productMaterialList
);
}
}
...
...
@@ -947,6 +911,7 @@ public class ShoppingCartConvertAdapter {
if
(
productCombo
.
getSpuId
()
!=
null
&&
!
productCombo
.
getSkuId
().
equals
(
productCombo
.
getSpuId
())
){
ProductTypeBeanDTO
productBeanDTO
=
subProductTypeMap
.
get
(
productCombo
.
getSpuId
());
updateComboxGoodsInfoFor
(
productCombo
,
productBeanDTO
,
true
);
}
else
{
//套餐子商品为单品
updateComboxGoodsInfoForMCoffee
(
productCombo
,
spuProduct
,
true
);
...
...
@@ -963,7 +928,6 @@ public class ShoppingCartConvertAdapter {
}
}
else
{
for
(
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
domain
.
CartGoods
.
ComboxGoods
productGroup
:
cartGoods
.
getProductGroupList
())
{
// ProductTypeBeanDTO productBeanDTO = subProductTypeMap.get(productGroup.getSpuId());
updateComboxGoodsInfoForMCoffee
(
productGroup
,
spuProduct
,
false
);
}
}
...
...
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