记得上下班打卡 | 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
0cabb623
Commit
0cabb623
authored
Jun 30, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加下单接口总耗时
parent
4dfeb069
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
KylinOrderTicketsServiceImpl.java
...vice/kylin/service/impl/KylinOrderTicketsServiceImpl.java
+6
-5
No files found.
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinOrderTicketsServiceImpl.java
View file @
0cabb623
...
@@ -113,11 +113,12 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
...
@@ -113,11 +113,12 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
public
ResponseDto
<
PayResultVo
>
checkCanOrder
(
PayOrderParam
payOrderParam
)
{
public
ResponseDto
<
PayResultVo
>
checkCanOrder
(
PayOrderParam
payOrderParam
)
{
Long
currentTime
;
Long
currentTime
;
boolean
isDownGeneral
=
false
;
boolean
isDownGeneral
=
false
;
Long
startTime
=
System
.
currentTimeMillis
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
String
lock
=
"userId:"
+
uid
;
String
lock
=
"userId:"
+
uid
;
if
(!
redisLockUtil
.
tryLock
(
lock
,
1
,
5
))
{
//
if (!redisLockUtil.tryLock(lock, 1, 5)) {
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20023"
));
//参数错误
//
return ResponseDto.failure(ErrorMapping.get("20023"));//参数错误
}
//
}
try
{
try
{
currentTime
=
System
.
currentTimeMillis
();
currentTime
=
System
.
currentTimeMillis
();
KylinPerformanceVo
performanceData
=
dataUtils
.
getPerformanceVo
(
payOrderParam
.
getPerformanceId
());
KylinPerformanceVo
performanceData
=
dataUtils
.
getPerformanceVo
(
payOrderParam
.
getPerformanceId
());
...
@@ -308,7 +309,8 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
...
@@ -308,7 +309,8 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
}
}
ResponseDto
<
PayResultVo
>
resultData
=
order
(
payOrderParam
,
uid
,
isMember
,
isTrueName
,
performanceData
,
ticketData
,
entersVoList
,
isStudent
,
ticketTimesData
,
currentTime
);
ResponseDto
<
PayResultVo
>
resultData
=
order
(
payOrderParam
,
uid
,
isMember
,
isTrueName
,
performanceData
,
ticketData
,
entersVoList
,
isStudent
,
ticketTimesData
,
currentTime
);
redisLockUtil
.
unlock
(
lock
);
// redisLockUtil.unlock(lock);
log
.
debug
(
"总耗时 ->"
+(
System
.
currentTimeMillis
()-
startTime
)+
"毫秒"
);
return
resultData
;
return
resultData
;
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -333,7 +335,6 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
...
@@ -333,7 +335,6 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
//生成订单 order_ticket
//生成订单 order_ticket
KylinOrderTickets
orderTickets
=
new
KylinOrderTickets
();
KylinOrderTickets
orderTickets
=
new
KylinOrderTickets
();
String
orderTicketId
=
IDGenerator
.
nextSnowId
().
toString
();
String
orderTicketId
=
IDGenerator
.
nextSnowId
().
toString
();
log
.
debug
(
"\n ORDER_TICKET_ID = "
+
orderTicketId
+
" \n TIME = "
+
System
.
currentTimeMillis
());
orderTickets
.
setOrderTicketsId
(
orderTicketId
);
orderTickets
.
setOrderTicketsId
(
orderTicketId
);
orderTickets
.
setUserId
(
uid
);
orderTickets
.
setUserId
(
uid
);
Map
token
=
CurrentUtil
.
getTokenClaims
();
Map
token
=
CurrentUtil
.
getTokenClaims
();
...
...
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