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
340735c1
Commit
340735c1
authored
Dec 15, 2020
by
刘鹏飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coco订单详情展示的商品单价需要加上小料的价格
parent
e09a3b6e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
order-application-service/src/main/java/cn/freemud/service/order/impl/CocoOrderRelationServiceImpl.java
+27
-0
No files found.
order-application-service/src/main/java/cn/freemud/service/order/impl/CocoOrderRelationServiceImpl.java
View file @
340735c1
...
...
@@ -161,10 +161,36 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
for
(
int
i
=
0
;
i
<
num
-
1
;
i
++){
ProductVo
newProduct
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
product
),
ProductVo
.
class
);
newProduct
.
setQty
(
1
);
// 商品原单价=商品原单价+小料原单价
List
<
ProductVo
>
smallMaterial
=
newProduct
.
getSetMaterialProducts
();
Long
smallMaterialOriTotal
=
0L
;
if
(
smallMaterial
!=
null
&&
!
smallMaterial
.
isEmpty
()){
for
(
ProductVo
sm
:
smallMaterial
){
smallMaterialOriTotal
=
smallMaterialOriTotal
+
sm
.
getOriginalPrice
();
}
}
// 商品现单价 = 商品现单价+小料现单价
smallMaterialOriTotal
=
smallMaterialOriTotal
==
null
?
0
:
smallMaterialOriTotal
;
newProduct
.
setOriginalPrice
(
smallMaterialOriTotal
+
(
product
.
getOriginalPrice
()
==
null
?
0L
:
product
.
getOriginalPrice
()));
productVos
.
add
(
newProduct
);
}
product
.
setQty
(
1
);
// 商品原单价=商品原单价+小料原单价
List
<
ProductVo
>
smallMaterial
=
product
.
getSetMaterialProducts
();
Long
smallMaterialOriTotal
=
0L
;
if
(
smallMaterial
!=
null
&&
!
smallMaterial
.
isEmpty
()){
for
(
ProductVo
sm
:
smallMaterial
){
smallMaterialOriTotal
=
smallMaterialOriTotal
+
sm
.
getOriginalPrice
();
}
}
// 商品现单价 = 商品现单价+小料现单价
smallMaterialOriTotal
=
smallMaterialOriTotal
==
null
?
0
:
smallMaterialOriTotal
;
product
.
setOriginalPrice
(
smallMaterialOriTotal
+
(
product
.
getOriginalPrice
()
==
null
?
0L
:
product
.
getOriginalPrice
()));
}
}
...
...
@@ -174,4 +200,5 @@ public class CocoOrderRelationServiceImpl implements OrderRelationService {
queryOrderResponseVo
.
setProducts
(
masterProducts
);
}
}
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