Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
caosy
/
fun-golf-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
711000c4
authored
Jan 10, 2018
by
Huang Linyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
老版本兼容bug 订单金额计算有误 修复
parent
76be5195
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
src/main/java/com/ctrip/fun/golf/service/order/AbstractOrderService.java
src/main/java/com/ctrip/fun/golf/service/order/EventActivityOrderService.java
src/main/java/com/ctrip/fun/golf/service/order/AbstractOrderService.java
View file @
711000c4
...
...
@@ -745,7 +745,7 @@ public abstract class AbstractOrderService<H extends AbstractOrderBean<T>, T> ex
*/
protected
void
checkTotalAmount
(
H
abstractOrderBean
)
{
BigDecimal
totAmount
=
getTotalAmount
(
abstractOrderBean
);
if
(
totAmount
.
compareTo
(
abstractOrderBean
.
getAmount
())
!=
0
)
{
if
(
totAmount
.
compareTo
(
abstractOrderBean
.
getAmount
())
!=
1
)
{
throw
new
OrderException
(-
5
,
"订单金额计算有误"
);
}
}
...
...
src/main/java/com/ctrip/fun/golf/service/order/EventActivityOrderService.java
View file @
711000c4
...
...
@@ -796,7 +796,7 @@ public class EventActivityOrderService extends
(
BigDecimal
.
valueOf
(
resourcePrice
.
getCommuneGuestPrice
())
.
subtract
(
BigDecimal
.
valueOf
(
resourcePrice
.
getCommuneGuestMinus
()))))).
doubleValue
();
if
(
resourceInfo
.
getAmount
().
compareTo
(
BigDecimal
.
valueOf
(
amount
))
!=
0
)
{
if
(
resourceInfo
.
getAmount
().
compareTo
(
BigDecimal
.
valueOf
(
amount
))
!=
-
1
)
{
//如果金额大于或者等于实际金额正常
throw
new
OrderException
(-
5
,
"订单金额计算有误"
);
}
else
if
(!
resourcePrice
.
getCommunePrice
().
equals
(
resourceInfo
.
getCommunePrice
())
||
!
resourcePrice
.
getCommuneMinus
().
equals
(
resourceInfo
.
getCommuneMinus
())
...
...
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