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
43cbf31b
Commit
43cbf31b
authored
Nov 03, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
21633612
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+10
-8
No files found.
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
43cbf31b
...
...
@@ -1243,7 +1243,7 @@ public class OrderAdapter {
responseVo
.
setAfterRefundInterval
(
false
);
}
//商品信息转换
convent2ProductVos
(
ordersBean
.
getProductList
(),
responseVo
);
convent2ProductVos
(
ordersBean
.
getProductList
(),
responseVo
,
ordersBean
.
getCompanyId
()
);
responseVo
.
setOrderAccounts
(
convent2OrderAccountVo
(
ordersBean
.
getApportionDetails
()));
if
(
CollectionUtils
.
isNotEmpty
(
ordersBean
.
getOrderCostDetailList
()))
{
ordersBean
.
getOrderCostDetailList
().
forEach
(
o
->
{
...
...
@@ -1914,7 +1914,7 @@ public class OrderAdapter {
return
orderAccountVos
;
}
public
void
convent2ProductVos
(
List
<
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
>
productBeans
,
QueryOrderResponseVo
responseVo
)
{
public
void
convent2ProductVos
(
List
<
QueryOrdersResponse
.
DataBean
.
OrderBean
.
ProductBean
>
productBeans
,
QueryOrderResponseVo
responseVo
,
String
partnerId
)
{
if
(
CollectionUtils
.
isEmpty
(
productBeans
))
{
return
;
}
...
...
@@ -1951,13 +1951,15 @@ public class OrderAdapter {
List
<
ProductVo
>
setMaterialProducts
=
new
ArrayList
<>();
productBean
.
getMaterialProduct
().
forEach
(
product
->
{
ProductVo
material
=
convent2ProductVo
(
product
);
material
.
setOriginalTotalAmount
(
new
BigDecimal
(
material
.
getOriginalPrice
()).
multiply
(
new
BigDecimal
(
productVo
.
getQty
())).
longValue
());
material
.
setSaleTotalAmount
(
new
BigDecimal
(
material
.
getFinalPrice
()).
multiply
(
new
BigDecimal
(
productVo
.
getQty
())).
longValue
());
if
(
mcCafePartnerId
.
equals
(
partnerId
))
{
material
.
setOriginalTotalAmount
(
new
BigDecimal
(
material
.
getOriginalPrice
()).
multiply
(
new
BigDecimal
(
productVo
.
getQty
())).
longValue
());
material
.
setSaleTotalAmount
(
new
BigDecimal
(
material
.
getFinalPrice
()).
multiply
(
new
BigDecimal
(
productVo
.
getQty
())).
longValue
());
productVo
.
setOriginalPrice
(
new
BigDecimal
(
productVo
.
getOriginalPrice
()).
add
(
new
BigDecimal
(
material
.
getOriginalPrice
())).
longValue
());
productVo
.
setFinalPrice
(
new
BigDecimal
(
productVo
.
getFinalPrice
()).
add
(
new
BigDecimal
(
material
.
getFinalPrice
())).
longValue
());
productVo
.
setOriginalTotalAmount
(
new
BigDecimal
(
productVo
.
getOriginalTotalAmount
()).
add
(
new
BigDecimal
(
material
.
getOriginalTotalAmount
())).
longValue
());
productVo
.
setSaleTotalAmount
(
new
BigDecimal
(
productVo
.
getSaleTotalAmount
()).
add
(
new
BigDecimal
(
material
.
getSaleTotalAmount
())).
longValue
());
}
setMaterialProducts
.
add
(
material
);
productVo
.
setOriginalPrice
(
new
BigDecimal
(
productVo
.
getOriginalPrice
()).
add
(
new
BigDecimal
(
material
.
getOriginalPrice
())).
longValue
());
productVo
.
setFinalPrice
(
new
BigDecimal
(
productVo
.
getFinalPrice
()).
add
(
new
BigDecimal
(
material
.
getFinalPrice
())).
longValue
());
productVo
.
setOriginalTotalAmount
(
new
BigDecimal
(
productVo
.
getOriginalTotalAmount
()).
add
(
new
BigDecimal
(
material
.
getOriginalTotalAmount
())).
longValue
());
productVo
.
setSaleTotalAmount
(
new
BigDecimal
(
productVo
.
getSaleTotalAmount
()).
add
(
new
BigDecimal
(
material
.
getSaleTotalAmount
())).
longValue
());
});
productVo
.
setSetMaterialProducts
(
setMaterialProducts
);
}
...
...
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