记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
9be51f70
Commit
9be51f70
authored
Sep 15, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flot -> BigDecimal
parent
c33f7fff
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
5 deletions
+78
-5
OrderRefundPoundage.java
...idnet/service/kylin/dto/vo/admin/OrderRefundPoundage.java
+4
-2
DataUtils.java
...iquidnet/client/admin/zhengzai/kylin/utils/DataUtils.java
+3
-3
KylinOrderTicketsServiceImpl.java
...vice/kylin/service/impl/KylinOrderTicketsServiceImpl.java
+71
-0
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/admin/OrderRefundPoundage.java
View file @
9be51f70
...
...
@@ -3,6 +3,8 @@ package com.liquidnet.service.kylin.dto.vo.admin;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
/**
* @version V1.0
* @class: OrderRefundPoundage
...
...
@@ -14,8 +16,8 @@ public class OrderRefundPoundage implements Cloneable {
private
int
day
;
@ApiModelProperty
(
value
=
"距离演出开始日期>15天"
)
private
String
content
;
@ApiModelProperty
(
value
=
"费率 如果手续费是0.1
这里存的是0.9
"
)
private
float
present
;
@ApiModelProperty
(
value
=
"费率 如果手续费是0.1"
)
private
BigDecimal
present
;
@ApiModelProperty
(
value
=
""
)
private
int
isCanRefund
;
...
...
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/utils/DataUtils.java
View file @
9be51f70
...
...
@@ -360,17 +360,17 @@ public class DataUtils {
OrderRefundPoundage
vo1
=
OrderRefundPoundage
.
getNew
();
vo1
.
setDay
(
15
);
vo1
.
setContent
(
"距离演出开始日期>15天"
);
vo1
.
setPresent
(
0.9f
);
vo1
.
setPresent
(
BigDecimal
.
valueOf
(
0.1
)
);
vo1
.
setIsCanRefund
(
1
);
OrderRefundPoundage
vo2
=
OrderRefundPoundage
.
getNew
();
vo2
.
setDay
(
3
);
vo2
.
setContent
(
"距离演出开始日期>3天-15天(含15天)"
);
vo2
.
setPresent
(
0.5f
);
vo2
.
setPresent
(
BigDecimal
.
valueOf
(
0.5
)
);
vo2
.
setIsCanRefund
(
1
);
OrderRefundPoundage
vo3
=
OrderRefundPoundage
.
getNew
();
vo3
.
setDay
(
0
);
vo3
.
setContent
(
"距离演出开始日期≤3天(含演出当天)"
);
vo3
.
setPresent
(
1.0f
);
vo3
.
setPresent
(
BigDecimal
.
valueOf
(
0
)
);
vo3
.
setIsCanRefund
(
0
);
voList
.
add
(
vo1
);
voList
.
add
(
vo2
);
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinOrderTicketsServiceImpl.java
View file @
9be51f70
...
...
@@ -36,6 +36,7 @@ import org.springframework.data.mongodb.core.query.Criteria;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
...
...
@@ -475,6 +476,76 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
return
"申请金额不得小于0"
;
}
// 手续费处理
ArrayList
<
OrderRefundPoundage
>
refundPoundage
=
dataUtils
.
getRefundPoundage
(
performanceVo
.
getIsRefundPoundage
());
if
(!
CollectionUtils
.
isEmpty
(
refundPoundage
))
{
// 手续费比例
BigDecimal
chargesNum
=
BigDecimal
.
valueOf
(
0
);
// 票种演出开始时间
String
useStart
=
orderTicketVo
.
getUseStart
();
DateTimeFormatter
df
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
LocalDateTime
useStartD
=
LocalDateTime
.
parse
(
useStart
,
df
);
// 3、15天之前的时间 时间可变
int
oneDay
=
refundPoundage
.
get
(
0
).
getDay
();
int
twoDay
=
refundPoundage
.
get
(
1
).
getDay
();
LocalDateTime
useStartD15Before
=
useStartD
.
minusDays
(
oneDay
);
LocalDateTime
useStartD3Before
=
useStartD
.
minusDays
(
twoDay
);
// 当前时间
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
if
(
useStartD15Before
.
isAfter
(
nowTime
))
{
// 15天以前的时间大于当前时间 距离演出开始日期>15天
log
.
info
(
"距离演出开始日期>15天"
);
log
.
info
(
"票种演出开始时间 {}"
,
useStartD
);
log
.
info
(
"15天之前的时间 {}"
,
useStartD15Before
);
log
.
info
(
"3天之前的时间 {}"
,
useStartD3Before
);
log
.
info
(
"当前时间 {}"
,
nowTime
);
log
.
info
(
"手续费比例 {}"
,
chargesNum
);
int
isCanRefund
=
refundPoundage
.
get
(
0
).
getIsCanRefund
();
if
(
isCanRefund
>
0
)
{
chargesNum
=
refundPoundage
.
get
(
0
).
getPresent
();
}
else
{
return
"当前日期不支持退票"
;
}
}
else
if
(
useStartD3Before
.
isAfter
(
nowTime
))
{
// 3天以前的时间大于当前时间 距离演出开始日期>3天-15天 含15天
log
.
info
(
"距离演出开始日期3-15天"
);
log
.
info
(
"票种演出开始时间 {}"
,
useStartD
);
log
.
info
(
"15天之前的时间 {}"
,
useStartD15Before
);
log
.
info
(
"3天之前的时间 {}"
,
useStartD3Before
);
log
.
info
(
"当前时间 {}"
,
nowTime
);
log
.
info
(
"手续费比例 {}"
,
chargesNum
);
int
isCanRefund
=
refundPoundage
.
get
(
1
).
getIsCanRefund
();
if
(
isCanRefund
>
0
)
{
chargesNum
=
refundPoundage
.
get
(
1
).
getPresent
();
}
else
{
return
"当前日期不支持退票"
;
}
}
else
{
// 三天以内 <=3
log
.
info
(
"距离演出开始日期<=3"
);
log
.
info
(
"票种演出开始时间 {}"
,
useStartD
);
log
.
info
(
"15天之前的时间 {}"
,
useStartD15Before
);
log
.
info
(
"3天之前的时间 {}"
,
useStartD3Before
);
log
.
info
(
"当前时间 {}"
,
nowTime
);
log
.
info
(
"手续费比例 {}"
,
chargesNum
);
int
isCanRefund
=
refundPoundage
.
get
(
2
).
getIsCanRefund
();
if
(
isCanRefund
>
0
)
{
chargesNum
=
refundPoundage
.
get
(
2
).
getPresent
();
}
else
{
return
"当前日期不支持退票"
;
}
}
BigDecimal
multiply
=
refundSinglePrice
.
multiply
(
chargesNum
);
log
.
info
(
"multiply {}"
,
multiply
);
refundSinglePrice
=
refundSinglePrice
.
subtract
(
multiply
);
log
.
info
(
"去除手续费申请金额 {}"
,
refundSinglePrice
);
if
(
refundSinglePrice
.
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
return
"申请金额不得小于0"
;
// return "去除手续费申请金额不得小于0";
}
}
else
{
log
.
info
(
"演出id1111 {}"
,
orderTicketVo
.
getPerformanceId
());
}
// 临时手续费 end
Map
token
=
CurrentUtil
.
getTokenClaims
();
String
username
=
StringUtils
.
defaultString
(((
String
)
token
.
get
(
"nickname"
)),
""
);
String
result
=
refundsStatusService
.
userOrderTicketRefunding
(
orderTicketVo
,
refundSinglePrice
.
doubleValue
(),
orderTicketEntitiesId
,
reason
,
picList
,
uid
,
username
,
kylinOrderRefundsVoBaseList
.
size
());
...
...
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