Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_ht
Commits
5582a7e9
Commit
5582a7e9
authored
Aug 09, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改订单计算
parent
3b651c63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+8
-9
No files found.
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
5582a7e9
...
...
@@ -1007,7 +1007,6 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
sOrder
.
getOrderType
().
equals
(
OrderTypeEnum
.
RESERVER
.
getCode
()))
{
new
Thread
(()
->
{
try
{
// 这里设置你的延迟时间,例如5秒
Thread
.
sleep
(
1000
);
redisUtil
.
set
(
ReceiptRdeisEnum
.
ORDER_NO
.
getValue
()
+
sOrder
.
getOrderNo
(),
jsonObject
.
toString
());
}
catch
(
InterruptedException
e
)
{
...
...
@@ -1900,7 +1899,6 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
JSONObject
jsonObject
=
new
JSONObject
(
map
);
new
Thread
(()
->
{
try
{
// 这里设置你的延迟时间,例如5秒
Thread
.
sleep
(
1000
);
redisUtil
.
set
(
ReceiptRdeisEnum
.
ORDER_NO_KEY
.
getValue
()
+
sOrder
.
getOrderNo
(),
jsonObject
.
toString
());
}
catch
(
InterruptedException
e
)
{
...
...
@@ -1914,7 +1912,6 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
JSONObject
jsonObject
=
new
JSONObject
(
map
);
new
Thread
(()
->
{
try
{
// 这里设置你的延迟时间,例如5秒
Thread
.
sleep
(
1000
);
redisUtil
.
set
(
ReceiptRdeisEnum
.
ORDER_NO
.
getValue
()
+
sOrder
.
getOrderNo
(),
jsonObject
.
toString
());
}
catch
(
InterruptedException
e
)
{
...
...
@@ -2270,7 +2267,6 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
JSONObject
jsonObject
=
new
JSONObject
(
map
);
new
Thread
(()
->
{
try
{
// 这里设置你的延迟时间,例如5秒
Thread
.
sleep
(
1000
);
redisUtil
.
set
(
ReceiptRdeisEnum
.
ORDER_NO_KEY
.
getValue
()
+
sOrder
.
getOrderNo
(),
jsonObject
.
toString
());
}
catch
(
InterruptedException
e
)
{
...
...
@@ -2380,6 +2376,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
queryWrapper
.
eq
(
Activity:
:
getLabelId
,
roomLabel
.
getLabelId
());
activity
=
activityService
.
getOne
(
queryWrapper
);
totalFee
=
getBigDecimal
(
request
,
activity
,
payPrice
,
user
,
consumerMember
);
priceResponse
.
setTotalFeeNow
(
totalFee
);
priceResponse
.
setMemberDiscount
(
payPrice
.
subtract
(
totalFee
));
// priceResponse.setTotalFeeNow(totalFee);
priceResponse
.
setDiscount
(
totalFee
.
divide
(
payPrice
,
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
)));
totalFee
=
getBigDecimal
(
consumerWallet
,
activity
,
timeLong
,
priceResponse
,
totalFee
,
room
,
request
,
consumerMember
);
...
...
@@ -2394,8 +2392,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
queryWrapper
.
eq
(
Activity:
:
getPackId
,
roomLabel
.
getPackId
());
activity
=
activityService
.
getOne
(
queryWrapper
);
totalFee
=
getBigDecimal
(
request
,
activity
,
payPrice
,
user
,
consumerMember
);
//
priceResponse.setTotalFeeNow(totalFee);
//
priceResponse.setMemberDiscount(payPrice.subtract(totalFee));
priceResponse
.
setTotalFeeNow
(
totalFee
);
priceResponse
.
setMemberDiscount
(
payPrice
.
subtract
(
totalFee
));
priceResponse
.
setDiscount
(
totalFee
.
divide
(
payPrice
,
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
)));
totalFee
=
getBigDecimal
(
consumerWallet
,
activity
,
timeLong
,
priceResponse
,
totalFee
,
byId
,
request
);
}
...
...
@@ -2409,7 +2407,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
queryWrapper
.
eq
(
Activity:
:
getLabelId
,
roomLabel
.
getLabelId
());
activity
=
activityService
.
getOne
(
queryWrapper
);
totalFee
=
getBigDecimal
(
request
,
activity
,
payPrice
,
user
,
consumerMember
);
// priceResponse.setTotalFeeNow(totalFee);
priceResponse
.
setTotalFeeNow
(
totalFee
);
priceResponse
.
setMemberDiscount
(
payPrice
.
subtract
(
totalFee
));
priceResponse
.
setDiscount
(
totalFee
.
divide
(
payPrice
,
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
)));
totalFee
=
getBigDecimal
(
consumerWallet
,
activity
,
timeLong
,
priceResponse
,
totalFee
,
room
,
request
,
consumerMember
);
}
...
...
@@ -2426,8 +2425,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
queryWrapper
.
eq
(
Activity:
:
getPackId
,
request
.
getPackId
());
activity
=
activityService
.
getOne
(
queryWrapper
);
totalFee
=
getBigDecimal
(
request
,
activity
,
payPrice
,
user
,
consumerMember
);
//
priceResponse.setTotalFeeNow(totalFee);
//
priceResponse.setMemberDiscount(payPrice.subtract(totalFee));
priceResponse
.
setTotalFeeNow
(
totalFee
);
priceResponse
.
setMemberDiscount
(
payPrice
.
subtract
(
totalFee
));
priceResponse
.
setDiscount
(
totalFee
.
divide
(
payPrice
,
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
)));
totalFee
=
getBigDecimal
(
consumerWallet
,
activity
,
timeLong
,
priceResponse
,
totalFee
,
byId
,
request
);
}
...
...
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