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
119bfc12
Commit
119bfc12
authored
Aug 08, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加料原总价和现总价设0
parent
975979ca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
assortment-shoppingcart-sdk/pom.xml
+1
-1
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/adapter/ShoppingCartAdapter.java
+5
-2
No files found.
assortment-shoppingcart-sdk/pom.xml
View file @
119bfc12
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
assortment-shoppingcart-sdk
</artifactId>
<artifactId>
assortment-shoppingcart-sdk
</artifactId>
<version>
1.1.3.73
3
.RELEASE
</version>
<version>
1.1.3.73
4
.RELEASE
</version>
<dependencies>
<dependencies>
<dependency>
<dependency>
...
...
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/adapter/ShoppingCartAdapter.java
View file @
119bfc12
...
@@ -321,6 +321,8 @@ public class ShoppingCartAdapter {
...
@@ -321,6 +321,8 @@ public class ShoppingCartAdapter {
cartGoods
.
setWeight
(
isSkuProduct
?
skuProduct
.
getWeight
()
:
spuProduct
.
getWeight
());
cartGoods
.
setWeight
(
isSkuProduct
?
skuProduct
.
getWeight
()
:
spuProduct
.
getWeight
());
cartGoods
.
setUnit
(
isSkuProduct
?
skuProduct
.
getUnit
()
:
spuProduct
.
getUnit
());
cartGoods
.
setUnit
(
isSkuProduct
?
skuProduct
.
getUnit
()
:
spuProduct
.
getUnit
());
cartGoods
.
setWeightType
(
CommonsConstant
.
WEIGHT_PRODUCT
.
equals
(
spuProduct
.
getWeightType
()));
cartGoods
.
setWeightType
(
CommonsConstant
.
WEIGHT_PRODUCT
.
equals
(
spuProduct
.
getWeightType
()));
cartGoods
.
setMaterialAmount
(
0L
);
cartGoods
.
setOriginalMaterialAmount
(
0L
);
// todo 设置加料
// todo 设置加料
this
.
checkMaterialProduct
(
cartGoods
,
spuProduct
);
this
.
checkMaterialProduct
(
cartGoods
,
spuProduct
);
...
@@ -337,6 +339,7 @@ public class ShoppingCartAdapter {
...
@@ -337,6 +339,7 @@ public class ShoppingCartAdapter {
* @param spuProduct
* @param spuProduct
*/
*/
private
void
checkMaterialProduct
(
CartGoods
cartGoods
,
ProductBeanDTO
spuProduct
)
{
private
void
checkMaterialProduct
(
CartGoods
cartGoods
,
ProductBeanDTO
spuProduct
)
{
if
(
CollectionUtils
.
isEmpty
(
cartGoods
.
getProductMaterialList
()))
return
;
if
(
CollectionUtils
.
isEmpty
(
cartGoods
.
getProductMaterialList
()))
return
;
//加料信息为空
//加料信息为空
if
(
CollectionUtils
.
isEmpty
(
spuProduct
.
getAdditionalGroupList
()))
return
;
if
(
CollectionUtils
.
isEmpty
(
spuProduct
.
getAdditionalGroupList
()))
return
;
...
@@ -359,7 +362,7 @@ public class ShoppingCartAdapter {
...
@@ -359,7 +362,7 @@ public class ShoppingCartAdapter {
material
.
setSpuId
(
detail
.
getProductId
());
material
.
setSpuId
(
detail
.
getProductId
());
//行单价 \ 行总价
//行单价 \ 行总价
material
.
setFinalPrice
(
detail
.
getProductFinalPrice
().
longValue
());
material
.
setFinalPrice
(
detail
.
getProductFinalPrice
().
longValue
());
material
.
setAmount
(
detail
.
getProductFinalPrice
().
longValue
());
material
.
setAmount
(
detail
.
getProductFinalPrice
().
longValue
()
*
cartGoods
.
getQty
()
);
//原行单价*数量
//原行单价*数量
material
.
setOriginalAmount
(
detail
.
getProductFinalPrice
().
longValue
()
*
cartGoods
.
getQty
());
material
.
setOriginalAmount
(
detail
.
getProductFinalPrice
().
longValue
()
*
cartGoods
.
getQty
());
material
.
setOriginalPrice
(
detail
.
getProductFinalPrice
().
longValue
());
material
.
setOriginalPrice
(
detail
.
getProductFinalPrice
().
longValue
());
...
@@ -376,7 +379,7 @@ public class ShoppingCartAdapter {
...
@@ -376,7 +379,7 @@ public class ShoppingCartAdapter {
//加料行记录原价总价
//加料行记录原价总价
cartGoods
.
setOriginalMaterialAmount
(
originalMaterAmount
);
cartGoods
.
setOriginalMaterialAmount
(
originalMaterAmount
);
cartGoods
.
setOriginalAmount
(
cartGoods
.
getOriginalAmount
()
+
originalMaterAmount
);
cartGoods
.
setOriginalAmount
(
cartGoods
.
getOriginalAmount
()
+
originalMaterAmount
);
cartGoods
.
setSubName
(
materialSubName
);
cartGoods
.
setSubName
(
StringUtils
.
strip
(
materialSubName
,
"/"
)
);
}
}
private
boolean
updateComboxGoodsInfo
(
CartGoods
cartGoods
,
CartGoods
.
ComboxGoods
comboxGoods
,
ProductBeanDTO
parentProductBean
,
List
<
ProductBeanDTO
>
productBeans
,
CartGoodsStates
cartGoodsStates
,
List
<
String
>
invalidGoodsIdList
)
{
private
boolean
updateComboxGoodsInfo
(
CartGoods
cartGoods
,
CartGoods
.
ComboxGoods
comboxGoods
,
ProductBeanDTO
parentProductBean
,
List
<
ProductBeanDTO
>
productBeans
,
CartGoodsStates
cartGoodsStates
,
List
<
String
>
invalidGoodsIdList
)
{
...
...
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