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
830d18e1
Commit
830d18e1
authored
Dec 07, 2020
by
孙昱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sunyu::update::fix bug about NPE
parent
c262860e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+12
-6
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
830d18e1
...
@@ -700,16 +700,22 @@ public class ShoppingCartConvertAdapter {
...
@@ -700,16 +700,22 @@ public class ShoppingCartConvertAdapter {
comboxGoods
.
setSpecProductId
(
attributes
.
get
(
ATTRIBUTEID
));
comboxGoods
.
setSpecProductId
(
attributes
.
get
(
ATTRIBUTEID
));
comboxGoods
.
setSubName
(
attributes
.
get
(
ATTRIBUTENAME
));
comboxGoods
.
setSubName
(
attributes
.
get
(
ATTRIBUTENAME
));
comboxGoods
.
setPic
(
isComboxGoods
?
productComboType
.
getPicture
()
:
groupDetailType
.
getPicture
());
comboxGoods
.
setPic
(
isComboxGoods
?
productComboType
.
getPicture
()
:
groupDetailType
.
getPicture
());
comboxGoods
.
setOriginalPrice
(
isComboxGoods
?
productComboType
.
getFinalPrice
().
longValue
()
:
groupDetailType
.
getProductFinalPrice
().
longValue
());
comboxGoods
.
setOriginalPrice
(
isComboxGoods
?
(
null
!=
productComboType
.
getFinalPrice
()
?
productComboType
.
getFinalPrice
().
longValue
()
:
0L
)
:
(
null
!=
groupDetailType
.
getProductFinalPrice
()
?
groupDetailType
.
getProductFinalPrice
().
longValue
()
:
0L
));
comboxGoods
.
setOriginalAmount
(
comboxGoods
.
getOriginalPrice
()
*
comboxGoods
.
getQty
());
comboxGoods
.
setOriginalAmount
(
comboxGoods
.
getOriginalPrice
()
*
comboxGoods
.
getQty
());
comboxGoods
.
setAmount
(
finalPrice
*
comboxGoods
.
getQty
());
comboxGoods
.
setAmount
(
finalPrice
*
comboxGoods
.
getQty
());
comboxGoods
.
setCustomerCode
(
isComboxGoods
?
productComboType
.
getCustomerCode
()
:
groupDetailType
.
getCustomerCode
());
comboxGoods
.
setCustomerCode
(
isComboxGoods
?
(
StringUtils
.
isNotEmpty
(
productComboType
.
getCustomerCode
())
?
productComboType
.
getCustomerCode
()
:
""
)
:
(
StringUtils
.
isNotEmpty
(
groupDetailType
.
getCustomerCode
())
?
groupDetailType
.
getCustomerCode
()
:
""
));
comboxGoods
.
setFinalPrice
(
finalPrice
);
comboxGoods
.
setFinalPrice
(
finalPrice
);
comboxGoods
.
setWeightType
(
isComboxGoods
?
CommonsConstant
.
WEIGHT_PRODUCT
.
equals
(
productComboType
.
getWeightType
())
:
CommonsConstant
.
WEIGHT_PRODUCT
.
equals
(
groupDetailType
.
getWeightType
()));
comboxGoods
.
setWeightType
(
isComboxGoods
?
CommonsConstant
.
WEIGHT_PRODUCT
.
equals
(
productComboType
.
getWeightType
())
:
CommonsConstant
.
WEIGHT_PRODUCT
.
equals
(
groupDetailType
.
getWeightType
()));
comboxGoods
.
setUnit
(
isComboxGoods
?
productComboType
.
getUnit
()
:
groupDetailType
.
getUnit
());
comboxGoods
.
setUnit
(
isComboxGoods
?
(
StringUtils
.
isNotEmpty
(
productComboType
.
getUnit
())
?
productComboType
.
getUnit
()
:
""
)
:
comboxGoods
.
setWeight
(
isComboxGoods
?
productComboType
.
getWeight
()
:
groupDetailType
.
getWeight
());
(
StringUtils
.
isNotEmpty
(
groupDetailType
.
getUnit
())
?
groupDetailType
.
getUnit
()
:
""
));
comboxGoods
.
setTax
(
isComboxGoods
?
productComboType
.
getTax
()
:
groupDetailType
.
getTax
());
comboxGoods
.
setWeight
(
isComboxGoods
?
(
null
==
productComboType
.
getWeight
()
?
0
:
productComboType
.
getWeight
())
:
comboxGoods
.
setTaxId
(
isComboxGoods
?
productComboType
.
getTaxId
()
:
groupDetailType
.
getTaxId
());
(
null
==
groupDetailType
.
getWeight
()
?
0
:
groupDetailType
.
getWeight
()));
comboxGoods
.
setTax
(
isComboxGoods
?
(
null
==
productComboType
.
getTax
()
?
0
:
productComboType
.
getTax
())
:
(
null
==
groupDetailType
.
getTax
()
?
0
:
groupDetailType
.
getTax
()));
comboxGoods
.
setTaxId
(
isComboxGoods
?
(
StringUtils
.
isNotEmpty
(
productComboType
.
getTaxId
())
?
productComboType
.
getTaxId
()
:
""
)
:
(
StringUtils
.
isNotEmpty
(
groupDetailType
.
getTaxId
())
?
groupDetailType
.
getTaxId
()
:
""
));
// TODO: 2020/10/22 套餐内可选商品加料,暂无
// TODO: 2020/10/22 套餐内可选商品加料,暂无
if
(
CollectionUtils
.
isNotEmpty
(
comboxGoods
.
getProductMaterialList
())){
if
(
CollectionUtils
.
isNotEmpty
(
comboxGoods
.
getProductMaterialList
())){
...
...
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