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
c4719198
Commit
c4719198
authored
Oct 29, 2020
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
餐道价格显示
parent
125b619c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
order-application-service/src/main/java/cn/freemud/adapter/DeliveryAdapter.java
+27
-4
No files found.
order-application-service/src/main/java/cn/freemud/adapter/DeliveryAdapter.java
View file @
c4719198
...
@@ -202,9 +202,9 @@ public class DeliveryAdapter {
...
@@ -202,9 +202,9 @@ public class DeliveryAdapter {
}
}
deliveryProductInfo
.
setProductName
(
productName
);
deliveryProductInfo
.
setProductName
(
productName
);
deliveryProductInfo
.
setProductNumber
(
productList
.
getNumber
());
deliveryProductInfo
.
setProductNumber
(
productList
.
getNumber
());
deliveryProductInfo
.
setProductPrice
(
productList
.
getPrice
().
intValue
());
deliveryProductInfo
.
setProductPrice
(
productList
.
get
Sale
Price
().
intValue
());
//餐道使用
//餐道使用
deliveryProductInfo
.
setCumulatedTotal
(
productList
.
getNumber
()
*
productList
.
getPrice
().
intValue
());
deliveryProductInfo
.
setCumulatedTotal
(
productList
.
getNumber
()
*
productList
.
get
Sale
Price
().
intValue
());
OrderProductAddInfoDto
orderProductAddInfoDto
=
JSON
.
parseObject
(
productList
.
getAddInfo
(),
OrderProductAddInfoDto
.
class
);
OrderProductAddInfoDto
orderProductAddInfoDto
=
JSON
.
parseObject
(
productList
.
getAddInfo
(),
OrderProductAddInfoDto
.
class
);
deliveryProductInfo
.
setTaxId
(
StringUtils
.
isNotEmpty
(
orderProductAddInfoDto
.
getTaxId
())
?
orderProductAddInfoDto
.
getTaxId
()
:
"10"
);
deliveryProductInfo
.
setTaxId
(
StringUtils
.
isNotEmpty
(
orderProductAddInfoDto
.
getTaxId
())
?
orderProductAddInfoDto
.
getTaxId
()
:
"10"
);
deliveryProductInfo
.
setTaxRate
(
orderProductAddInfoDto
.
getTax
()
>
0
?
orderProductAddInfoDto
.
getTax
()
:
6
);
deliveryProductInfo
.
setTaxRate
(
orderProductAddInfoDto
.
getTax
()
>
0
?
orderProductAddInfoDto
.
getTax
()
:
6
);
...
@@ -238,21 +238,44 @@ public class DeliveryAdapter {
...
@@ -238,21 +238,44 @@ public class DeliveryAdapter {
}
}
deliveryComboProductInfo
.
setProductName
(
productNameCombo
);
deliveryComboProductInfo
.
setProductName
(
productNameCombo
);
deliveryComboProductInfo
.
setProductNumber
(
comboProduct
.
getNumber
()/
productList
.
getNumber
());
deliveryComboProductInfo
.
setProductNumber
(
comboProduct
.
getNumber
()/
productList
.
getNumber
());
deliveryComboProductInfo
.
setProductPrice
(
comboProduct
.
getPrice
().
intValue
());
deliveryComboProductInfo
.
setProductPrice
(
comboProduct
.
get
Sale
Price
().
intValue
());
//餐道使用
//餐道使用
deliveryComboProductInfo
.
setCumulatedTotal
(
comboProduct
.
getNumber
()
*
comboProduct
.
getPrice
().
intValue
());
deliveryComboProductInfo
.
setCumulatedTotal
(
comboProduct
.
getNumber
()
*
comboProduct
.
get
Sale
Price
().
intValue
());
OrderProductAddInfoDto
orderComboProductAddInfoDto
=
JSON
.
parseObject
(
comboProduct
.
getAddInfo
(),
OrderProductAddInfoDto
.
class
);
OrderProductAddInfoDto
orderComboProductAddInfoDto
=
JSON
.
parseObject
(
comboProduct
.
getAddInfo
(),
OrderProductAddInfoDto
.
class
);
deliveryComboProductInfo
.
setTaxId
(
StringUtils
.
isNotEmpty
(
orderComboProductAddInfoDto
.
getTaxId
())
?
orderComboProductAddInfoDto
.
getTaxId
()
:
"10"
);
deliveryComboProductInfo
.
setTaxId
(
StringUtils
.
isNotEmpty
(
orderComboProductAddInfoDto
.
getTaxId
())
?
orderComboProductAddInfoDto
.
getTaxId
()
:
"10"
);
deliveryComboProductInfo
.
setTaxRate
(
orderComboProductAddInfoDto
.
getTax
()
>
0
?
orderComboProductAddInfoDto
.
getTax
()
:
6
);
deliveryComboProductInfo
.
setTaxRate
(
orderComboProductAddInfoDto
.
getTax
()
>
0
?
orderComboProductAddInfoDto
.
getTax
()
:
6
);
deliveryComboProductInfo
.
setParentCode
(
Long
.
valueOf
(
comboProduct
.
getParentProductId
().
split
(
"_"
)[
0
]));
deliveryComboProductInfo
.
setParentCode
(
Long
.
valueOf
(
comboProduct
.
getParentProductId
().
split
(
"_"
)[
0
]));
if
(
CollectionUtils
.
isNotEmpty
(
comboProduct
.
getMaterialProduct
()))
{
comboProduct
.
getMaterialProduct
().
forEach
(
o
->
{
deliveryComboProductInfo
.
setProductPrice
(
deliveryComboProductInfo
.
getProductPrice
()
+
o
.
getSalePrice
().
intValue
());
//餐道使用
deliveryComboProductInfo
.
setCumulatedTotal
(
deliveryComboProductInfo
.
getCumulatedTotal
()
+
comboProduct
.
getNumber
()
*
o
.
getSalePrice
().
intValue
());
deliveryProductInfo
.
setProductPrice
(
deliveryProductInfo
.
getProductPrice
()
+
o
.
getSalePrice
().
intValue
());
//餐道使用
deliveryProductInfo
.
setCumulatedTotal
(
deliveryProductInfo
.
getCumulatedTotal
()
+
comboProduct
.
getNumber
()
*
o
.
getSalePrice
().
intValue
());
});
}
productInfos
.
add
(
deliveryComboProductInfo
);
productInfos
.
add
(
deliveryComboProductInfo
);
});
});
}
}
if
(
CollectionUtils
.
isNotEmpty
(
productList
.
getMaterialProduct
()))
{
productList
.
getMaterialProduct
().
forEach
(
o
->
{
deliveryProductInfo
.
setProductPrice
(
deliveryProductInfo
.
getProductPrice
()
+
o
.
getSalePrice
().
intValue
());
//餐道使用
deliveryProductInfo
.
setCumulatedTotal
(
deliveryProductInfo
.
getCumulatedTotal
()
+
productList
.
getNumber
()
*
o
.
getSalePrice
().
intValue
());
});
}
});
});
deliveryOrderRequestDto
.
setProductTotal
(
productInfos
.
stream
().
mapToInt
(
t
->
t
.
getCumulatedTotal
()).
sum
());
deliveryOrderRequestDto
.
setProductTotal
(
productInfos
.
stream
().
mapToInt
(
t
->
t
.
getCumulatedTotal
()).
sum
());
}
}
deliveryOrderRequestDto
.
setProductInfos
(
productInfos
);
deliveryOrderRequestDto
.
setProductInfos
(
productInfos
);
deliveryOrderRequestDto
.
setOrderSource
(
OrderSourceType
.
ALIPAY
.
getCode
().
equals
(
order
.
getSource
())?
"Alipay"
:
"freemud"
);
deliveryOrderRequestDto
.
setOrderSource
(
OrderSourceType
.
ALIPAY
.
getCode
().
equals
(
order
.
getSource
())?
"Alipay"
:
"freemud"
);
if
(
CollectionUtils
.
isNotEmpty
(
order
.
getAccountList
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
order
.
getAccountList
()))
{
...
...
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