Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周健威
rs-cloud-platform
Commits
aa07254d
Commit
aa07254d
authored
Dec 30, 2020
by
unset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加通知信息
parent
512c4214
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
71 deletions
+71
-71
ConfirmOrderService.java
...yuns/platform/rs/website/service/ConfirmOrderService.java
+71
-71
No files found.
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/service/ConfirmOrderService.java
View file @
aa07254d
...
...
@@ -54,6 +54,7 @@ public class ConfirmOrderService {
/**
* 确认订单
*
* @param confirmOrderDto
* @return
*/
...
...
@@ -68,9 +69,7 @@ public class ConfirmOrderService {
AtomicReference
<
Integer
>
number
=
new
AtomicReference
<>(
0
);
AtomicReference
<
Double
>
amount
=
new
AtomicReference
<>((
double
)
0
);
itemInfoDtoList
.
parallelStream
().
forEach
(
itemInfoDto
->
{
switch
(
OrderTypeEnum
.
getByCode
(
itemInfoDto
.
getType
()))
{
//标准数据
case
STANDARD_DATA:
if
(
itemInfoDto
.
getType
().
equals
(
OrderTypeEnum
.
STANDARD_DATA
.
getType
()))
{
List
<
ImageDataVO
>
imageDataVOList
=
datacenterFeign
.
queryByIds
(
itemInfoDto
.
getId
()
+
""
).
getData
();
if
(
imageDataVOList
!=
null
&&
imageDataVOList
.
size
()
>
0
)
{
ImageDataVO
imageDataVO
=
imageDataVOList
.
get
(
0
);
...
...
@@ -86,8 +85,9 @@ public class ConfirmOrderService {
BigDecimal
totalAmount
=
imageDataVO
.
getPrice
().
multiply
(
new
BigDecimal
(
itemInfoDto
.
getNumber
()));
amount
.
updateAndGet
(
v
->
new
Double
((
double
)
(
v
+
totalAmount
.
doubleValue
())));
}
//行业应用
case
INDUSTRY_INFO:
}
if
(
itemInfoDto
.
getType
().
equals
(
OrderTypeEnum
.
INDUSTRY_INFO
.
getType
()))
{
IndustryApplicationInfo
industryApplicationInfo
=
industryApplicationInfoBiz
.
getOneById
(
itemInfoDto
.
getId
().
intValue
()).
getData
();
if
(
industryApplicationInfo
!=
null
)
{
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
...
...
@@ -104,10 +104,11 @@ public class ConfirmOrderService {
BigDecimal
totalAmount
=
industryApplicationInfo
.
getPrice
().
multiply
(
new
BigDecimal
(
itemInfoDto
.
getNumber
()));
amount
.
updateAndGet
(
v
->
new
Double
((
double
)
(
v
+
totalAmount
.
doubleValue
())));
}
//影像图库
case
IMAGE_STORAGE:
}
if
(
itemInfoDto
.
getType
().
equals
(
OrderTypeEnum
.
IMAGE_STORAGE
.
getType
()))
{
ImageInfoRelation
imageInfoRelation
=
imageInfoRelationBiz
.
selectById
(
itemInfoDto
.
getId
());
if
(
imageInfoRelation
!=
null
)
{
if
(
imageInfoRelation
!=
null
)
{
ImageImgStorage
imageImgStorage
=
imageImgStorageBiz
.
getDetail
(
itemInfoDto
.
getId
().
intValue
()).
getData
();
if
(
imageImgStorage
!=
null
)
{
List
<
ImageInfoRelation
>
imageInfoRelationList
=
new
ArrayList
<>();
...
...
@@ -128,8 +129,9 @@ public class ConfirmOrderService {
amount
.
updateAndGet
(
v
->
new
Double
((
double
)
(
v
+
totalAmount
.
doubleValue
())));
}
}
//购物车
case
SHOPPING_CART_INFO:
}
if
(
itemInfoDto
.
getType
().
equals
(
OrderTypeEnum
.
SHOPPING_CART_INFO
.
getType
()))
{
ShoppingCartInfo
shoppingCartInfo
=
shoppingCartInfoBiz
.
selectById
(
itemInfoDto
.
getId
());
if
(
shoppingCartInfo
!=
null
)
{
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
...
...
@@ -145,8 +147,6 @@ public class ConfirmOrderService {
BigDecimal
totalAmount
=
shoppingCartInfo
.
getTotalAmount
();
amount
.
updateAndGet
(
v
->
new
Double
((
double
)
(
v
+
totalAmount
.
doubleValue
())));
}
default
:
break
;
}
});
confirmOrderInfoVo
.
setTotalAmount
(
new
BigDecimal
(
amount
.
get
()));
...
...
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