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
d62238a4
authored
Apr 18, 2018
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct the quantity of eventactivityorderitem
parent
8e895dd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
src/main/java/com/ctrip/fun/golf/service/order/EventActivityOrderService.java
src/main/java/com/ctrip/fun/golf/service/order/EventActivityOrderService.java
View file @
d62238a4
...
...
@@ -836,6 +836,14 @@ public class EventActivityOrderService extends
(
BigDecimal
.
valueOf
(
resourcePrice
.
getCommuneGuestPrice
())
.
subtract
(
BigDecimal
.
valueOf
(
resourcePrice
.
getCommuneGuestMinus
()))))).
doubleValue
();
//boolean isCommuneQuantityCorrect = (communeNum == resourceInfo.getCommuneQuantity());
//boolean isCommuneGuestQuantityCorrect = (communeGuestNum == resourceInfo.getCommuneGuestQuantity());
//boolean isTotalQuantityCorrect = ((communeNum+communeGuestNum) == resourceInfo.getQuantity());
//校准quantity人数,有可能客户端传的人数有差,理论上应该直接抛异常,不过为了兼容线上老版本, 先放行,服务端先处理掉。
resourceInfo
.
setCommuneQuantity
(
communeNum
);
resourceInfo
.
setCommuneGuestQuantity
(
communeGuestNum
);
resourceInfo
.
setQuantity
(
communeNum
+
communeGuestNum
);
if
(
resourceInfo
.
getAmount
().
compareTo
(
BigDecimal
.
valueOf
(
amount
))
==
-
1
)
{
//如果金额大于或者等于实际金额正常
throw
new
OrderException
(-
5
,
"订单金额计算有误"
);
}
else
if
(!
resourcePrice
.
getCommunePrice
().
equals
(
resourceInfo
.
getCommunePrice
())
...
...
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