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
5cd3cff9
Commit
5cd3cff9
authored
Aug 09, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/dev' into test
parents
f0c09e84
241901b0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+13
-13
No files found.
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
5cd3cff9
...
...
@@ -2342,7 +2342,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
activity
=
activityService
.
getOne
(
queryWrapper
);
totalFee
=
getBigDecimal
(
request
,
activity
,
payPrice
,
user
,
consumerMember
);
// priceResponse.setTotalFeeNow(totalFee);
priceResponse
.
setDiscount
(
totalFee
.
divide
(
payPrice
).
multiply
(
new
BigDecimal
(
100
)));
priceResponse
.
setDiscount
(
totalFee
.
divide
(
payPrice
,
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
)));
totalFee
=
getBigDecimal
(
consumerWallet
,
activity
,
timeLong
,
priceResponse
,
totalFee
,
room
,
request
,
consumerMember
);
}
}
else
{
...
...
@@ -2357,7 +2357,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
totalFee
=
getBigDecimal
(
request
,
activity
,
payPrice
,
user
,
consumerMember
);
priceResponse
.
setTotalFeeNow
(
totalFee
);
priceResponse
.
setMemberDiscount
(
payPrice
.
subtract
(
totalFee
));
priceResponse
.
setDiscount
(
totalFee
.
divide
(
payPrice
).
multiply
(
new
BigDecimal
(
100
)));
priceResponse
.
setDiscount
(
totalFee
.
divide
(
payPrice
,
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
)));
totalFee
=
getBigDecimal
(
consumerWallet
,
activity
,
timeLong
,
priceResponse
,
totalFee
,
byId
,
request
);
}
// totalFee = getBigDecimal(consumerWallet, timeLong, priceResponse, totalFee, byId);
...
...
@@ -2371,7 +2371,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
activity
=
activityService
.
getOne
(
queryWrapper
);
totalFee
=
getBigDecimal
(
request
,
activity
,
payPrice
,
user
,
consumerMember
);
// priceResponse.setTotalFeeNow(totalFee);
priceResponse
.
setDiscount
(
totalFee
.
divide
(
payPrice
).
multiply
(
new
BigDecimal
(
100
)));
priceResponse
.
setDiscount
(
totalFee
.
divide
(
payPrice
,
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
)));
totalFee
=
getBigDecimal
(
consumerWallet
,
activity
,
timeLong
,
priceResponse
,
totalFee
,
room
,
request
,
consumerMember
);
}
// totalFee = getBigDecimal(consumerWallet, timeLong, priceResponse, totalFee, room);
...
...
@@ -2389,7 +2389,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
totalFee
=
getBigDecimal
(
request
,
activity
,
payPrice
,
user
,
consumerMember
);
priceResponse
.
setTotalFeeNow
(
totalFee
);
priceResponse
.
setMemberDiscount
(
payPrice
.
subtract
(
totalFee
));
priceResponse
.
setDiscount
(
totalFee
.
divide
(
payPrice
).
multiply
(
new
BigDecimal
(
100
)));
priceResponse
.
setDiscount
(
totalFee
.
divide
(
payPrice
,
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
)));
totalFee
=
getBigDecimal
(
consumerWallet
,
activity
,
timeLong
,
priceResponse
,
totalFee
,
byId
,
request
);
}
...
...
@@ -2500,7 +2500,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
priceResponse
.
setDuration
(
consumerWallet
.
getRemainingDuration
());
priceResponse
.
setRemainingDuration
(
new
BigDecimal
(
0
));
BigDecimal
remainingBalance
=
consumerWallet
.
getRemainingDuration
().
multiply
(
room
.
getPrice
());
totalFee
=
totalFee
.
divide
(
memberConfig
.
getDiscountRatio
()).
multiply
(
new
BigDecimal
(
100
));
totalFee
=
totalFee
.
divide
(
memberConfig
.
getDiscountRatio
()
,
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
));
remainingBalance
=
totalFee
.
subtract
(
remainingBalance
);
BigDecimal
divide
=
remainingBalance
;
divide
=
divide
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
...
...
@@ -2527,7 +2527,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
//时长的金额
BigDecimal
remainingBalance
=
consumerWallet
.
getRemainingDuration
().
multiply
(
room
.
getPrice
());
//恢复原价
totalFee
=
totalFee
.
divide
(
memberConfig
.
getDiscountRatio
()).
multiply
(
new
BigDecimal
(
100
));
totalFee
=
totalFee
.
divide
(
memberConfig
.
getDiscountRatio
()
,
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
));
//原价减时长
remainingBalance
=
totalFee
.
subtract
(
remainingBalance
);
BigDecimal
divide
=
remainingBalance
;
...
...
@@ -2629,10 +2629,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
boolean
match
=
executionTime
.
isMatch
(
ZonedDateTime
.
ofInstant
(
request
.
getPreStartDate
().
toInstant
(),
ZoneId
.
systemDefault
()));
boolean
match1
=
executionTime
.
isMatch
(
ZonedDateTime
.
ofInstant
(
request
.
getPreEndDate
().
toInstant
(),
ZoneId
.
systemDefault
()));
if
(
match
&&
match1
)
{
payPrice
=
payPrice
.
multiply
(
activity
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
payPrice
=
payPrice
.
multiply
(
activity
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
)
,
2
,
RoundingMode
.
HALF_UP
);
}
else
{
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
)
,
2
,
RoundingMode
.
HALF_UP
);
}
}
else
{
AtomicInteger
i
=
new
AtomicInteger
();
...
...
@@ -2641,7 +2641,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
boolean
match1
=
executionTime
.
isMatch
(
ZonedDateTime
.
ofInstant
(
item
.
getPreEndDate
().
toInstant
(),
ZoneId
.
systemDefault
()));
if
(
match
&&
match1
&&
item
.
getDuration
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
&&
(
item
.
getPayPrice
().
add
(
item
.
getBalance
())).
divide
(
item
.
getTotalPrice
()).
multiply
(
new
BigDecimal
(
100
)).
compareTo
(
activity
.
getDiscountRatio
())
==
0
&&
(
item
.
getPayPrice
().
add
(
item
.
getBalance
())).
divide
(
item
.
getTotalPrice
()
,
2
,
RoundingMode
.
HALF_UP
).
multiply
(
new
BigDecimal
(
100
)).
compareTo
(
activity
.
getDiscountRatio
())
==
0
)
{
i
.
getAndIncrement
();
}
...
...
@@ -2650,17 +2650,17 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
boolean
match
=
executionTime
.
isMatch
(
ZonedDateTime
.
ofInstant
(
request
.
getPreStartDate
().
toInstant
(),
ZoneId
.
systemDefault
()));
boolean
match1
=
executionTime
.
isMatch
(
ZonedDateTime
.
ofInstant
(
request
.
getPreEndDate
().
toInstant
(),
ZoneId
.
systemDefault
()));
if
(
match
&&
match1
)
{
payPrice
=
payPrice
.
multiply
(
activity
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
payPrice
=
payPrice
.
multiply
(
activity
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
)
,
2
,
RoundingMode
.
HALF_UP
);
}
else
{
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
)
,
2
,
RoundingMode
.
HALF_UP
);
}
// payPrice = payPrice.multiply(activity.getDiscountRatio()).divide(new BigDecimal(100));
}
else
{
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
)
,
2
,
RoundingMode
.
HALF_UP
);
}
}
}
else
{
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
));
payPrice
=
payPrice
.
multiply
(
memberConfig
.
getDiscountRatio
()).
divide
(
new
BigDecimal
(
100
)
,
2
,
RoundingMode
.
HALF_UP
);
}
}
return
payPrice
;
...
...
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