Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
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
youjj
cloud-platform
Commits
9a370439
Commit
9a370439
authored
Sep 20, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-modify-cutAmount' into dev
parents
f799ea1e
52babe51
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
37 deletions
+38
-37
OrderCalculateBiz.java
.../com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
+38
-37
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
View file @
9a370439
...
@@ -78,12 +78,16 @@ public class OrderCalculateBiz {
...
@@ -78,12 +78,16 @@ public class OrderCalculateBiz {
Integer
residueDays
=
orderItem
.
getTotalNum
()
-
useDays
;
Integer
residueDays
=
orderItem
.
getTotalNum
()
-
useDays
;
//过了出发时间取消订单 ,优先使用免费天数
//过了出发时间取消订单 ,优先使用免费天数
if
(
backFreeDays
<=
0
)
{
if
(
backFreeDays
<=
0
)
{
//使用天数 小于 总天数
//消费天数
if
(
useDays
<
orderItem
.
getTotalNum
())
{
Integer
consumeDays
=
useDays
-
freeDays
;
//如果使用天数 大于 总天数
if
(
useDays
>
orderItem
.
getTotalNum
())
{
//消费天数
consumeDays
=
orderItem
.
getTotalNum
()
-
freeDays
;
}
//需要扣除订单费用
//需要扣除订单费用
//判断是否达到优惠券条件 不符合则返还优惠券
//判断是否达到优惠券条件 不符合则返还优惠券
//消费天数
Integer
consumeDays
=
0
-
backFreeDays
;
//计算使用天数的费用
//计算使用天数的费用
consumeAmount
=
orderItem
.
getUnitPrice
().
multiply
(
new
BigDecimal
(
consumeDays
+
""
));
consumeAmount
=
orderItem
.
getUnitPrice
().
multiply
(
new
BigDecimal
(
consumeDays
+
""
));
if
(
StrUtil
.
isNotBlank
(
baseOrder
.
getCouponTickerNos
()))
{
if
(
StrUtil
.
isNotBlank
(
baseOrder
.
getCouponTickerNos
()))
{
...
@@ -121,9 +125,6 @@ public class OrderCalculateBiz {
...
@@ -121,9 +125,6 @@ public class OrderCalculateBiz {
//设置额外扣减(押金里面扣)
//设置额外扣减(押金里面扣)
inProgressVO
.
setExtraAmount
(
consumeAmount
.
subtract
(
baseOrder
.
getGoodsAmount
()));
inProgressVO
.
setExtraAmount
(
consumeAmount
.
subtract
(
baseOrder
.
getGoodsAmount
()));
}
}
}
else
{
}
}
else
{
}
else
{
//返回剩余免费天数,返回优惠券,订单款
//返回剩余免费天数,返回优惠券,订单款
refundAmount
=
refundAmount
.
add
(
baseOrder
.
getGoodsAmount
());
refundAmount
=
refundAmount
.
add
(
baseOrder
.
getGoodsAmount
());
...
...
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