记得上下班打卡 | 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
b67cc9cf
Commit
b67cc9cf
authored
Jul 02, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下单回滚 限购
parent
b645ded0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
KylinOrderTicketsServiceImpl.java
...vice/order/service/impl/KylinOrderTicketsServiceImpl.java
+15
-6
No files found.
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/service/impl/KylinOrderTicketsServiceImpl.java
View file @
b67cc9cf
...
@@ -110,6 +110,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
...
@@ -110,6 +110,7 @@ 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
;
List
<
AdamEntersVo
>
entersVoList
=
new
ArrayList
<>();
Long
startTime
=
System
.
currentTimeMillis
();
Long
startTime
=
System
.
currentTimeMillis
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
String
uid
=
CurrentUtil
.
getCurrentUid
();
String
lock
=
"userId:"
+
uid
;
String
lock
=
"userId:"
+
uid
;
...
@@ -260,7 +261,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
...
@@ -260,7 +261,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
isDownGeneral
=
true
;
isDownGeneral
=
true
;
//学生票 判断
//学生票 判断
List
<
AdamEntersVo
>
entersVoList
=
new
ArrayList
<>();
entersVoList
=
new
ArrayList
<>();
if
(
isTrueName
==
1
)
{
if
(
isTrueName
==
1
)
{
currentTime
=
System
.
currentTimeMillis
();
currentTime
=
System
.
currentTimeMillis
();
for
(
String
enterId
:
payOrderParam
.
getEnterIdList
())
{
for
(
String
enterId
:
payOrderParam
.
getEnterIdList
())
{
...
@@ -318,6 +319,14 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
...
@@ -318,6 +319,14 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
dataUtils
.
changeSurplusGeneral
(
payOrderParam
.
getTicketId
(),
payOrderParam
.
getNumber
());
dataUtils
.
changeSurplusGeneral
(
payOrderParam
.
getTicketId
(),
payOrderParam
.
getNumber
());
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"redis 修改库存 异常 -> time:"
+
(
currentTime
)
+
"毫秒"
);
log
.
debug
(
"redis 修改库存 异常 -> time:"
+
(
currentTime
)
+
"毫秒"
);
for
(
AdamEntersVo
enters
:
entersVoList
)
{
dataUtils
.
changeBuyInfo
(
uid
,
enters
.
getIdCard
(),
payOrderParam
.
getPerformanceId
(),
payOrderParam
.
getTicketId
(),
-
1
);
}
if
(
entersVoList
.
size
()
==
0
)
{
for
(
int
i
=
0
;
i
<
payOrderParam
.
getNumber
();
i
++)
{
dataUtils
.
changeBuyInfo
(
uid
,
""
,
payOrderParam
.
getPerformanceId
(),
payOrderParam
.
getTicketId
(),
-
1
);
}
}
}
}
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
error
(
"Kylin Order Pay Error = "
+
e
.
getMessage
());
log
.
error
(
"Kylin Order Pay Error = "
+
e
.
getMessage
());
...
@@ -1153,12 +1162,12 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
...
@@ -1153,12 +1162,12 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
}
}
Map
token
=
CurrentUtil
.
getTokenClaims
();
Map
token
=
CurrentUtil
.
getTokenClaims
();
String
username
=
StringUtils
.
defaultString
(((
String
)
token
.
get
(
"nickname"
)),
""
);
String
username
=
StringUtils
.
defaultString
(((
String
)
token
.
get
(
"nickname"
)),
""
);
//
String result = refundsStatusService.userOrderTicketRefunding(orderTicketVo, refundSinglePrice.doubleValue(), orderTicketEntitiesId, reason, picList, uid, username, kylinOrderRefundsVoBaseList.size());
String
result
=
refundsStatusService
.
userOrderTicketRefunding
(
orderTicketVo
,
refundSinglePrice
.
doubleValue
(),
orderTicketEntitiesId
,
reason
,
picList
,
uid
,
username
,
kylinOrderRefundsVoBaseList
.
size
());
//
if (result != "") {
if
(
result
!=
""
)
{
//
return ResponseDto.success(result);
return
ResponseDto
.
success
(
result
);
//
} else {
}
else
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20019"
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20019"
));
//
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20019"
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20019"
));
...
...
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