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
e9195f64
Commit
e9195f64
authored
Dec 28, 2020
by
刘鹏飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coco订单详情的商品总价需要包含赠品的价格
parent
4ac6c077
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
order-application-service/src/main/java/cn/freemud/service/order/impl/CocoOrderRelationServiceImpl.java
+6
-2
No files found.
order-application-service/src/main/java/cn/freemud/service/order/impl/CocoOrderRelationServiceImpl.java
View file @
e9195f64
...
@@ -137,7 +137,8 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
...
@@ -137,7 +137,8 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
});
});
}
}
// 赠品原总价
Long
giftOriTotalAmount
=
0L
;
List
<
ProductVo
>
productVos
=
new
ArrayList
<>();
List
<
ProductVo
>
productVos
=
new
ArrayList
<>();
if
(
null
!=
masterProducts
&&
!
masterProducts
.
isEmpty
()){
if
(
null
!=
masterProducts
&&
!
masterProducts
.
isEmpty
()){
for
(
ProductVo
product
:
masterProducts
){
for
(
ProductVo
product
:
masterProducts
){
...
@@ -155,7 +156,7 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
...
@@ -155,7 +156,7 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
// 商品现单价 = 商品现单价+小料现单价
// 商品现单价 = 商品现单价+小料现单价
smallMaterialOriTotal
=
smallMaterialOriTotal
==
null
?
0
:
smallMaterialOriTotal
;
smallMaterialOriTotal
=
smallMaterialOriTotal
==
null
?
0
:
smallMaterialOriTotal
;
product
.
setOriginalPrice
(
smallMaterialOriTotal
+
(
product
.
getOriginalPrice
()
==
null
?
0L
:
product
.
getOriginalPrice
()));
product
.
setOriginalPrice
(
smallMaterialOriTotal
+
(
product
.
getOriginalPrice
()
==
null
?
0L
:
product
.
getOriginalPrice
()));
giftOriTotalAmount
=
giftOriTotalAmount
+
product
.
getOriginalPrice
()
*
giftQty
;
// 如果商品参加了第二件半价活动,要把该行拆成数量为1的多行
// 如果商品参加了第二件半价活动,要把该行拆成数量为1的多行
...
@@ -190,6 +191,9 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
...
@@ -190,6 +191,9 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
masterProducts
.
addAll
(
productVos
);
masterProducts
.
addAll
(
productVos
);
queryOrderResponseVo
.
setProducts
(
masterProducts
);
queryOrderResponseVo
.
setProducts
(
masterProducts
);
// 商品总价需要包含赠品的价格
queryOrderResponseVo
.
setItemAmount
(
queryOrderResponseVo
.
getItemAmount
()
+
giftOriTotalAmount
);
}
}
}
}
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