记得上下班打卡 | 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
97f5738f
Commit
97f5738f
authored
Jun 22, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
回滚脚本
parent
0bc14f4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
KylinOrderTicketsServiceImpl.java
...vice/kylin/service/impl/KylinOrderTicketsServiceImpl.java
+6
-4
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 @
97f5738f
...
@@ -1022,6 +1022,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -1022,6 +1022,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
Long
currentTime
=
System
.
currentTimeMillis
();
Long
currentTime
=
System
.
currentTimeMillis
();
HashMap
<
String
,
Integer
>
mapSurplusGeneral
=
new
HashMap
<>();
HashMap
<
String
,
Integer
>
mapSurplusGeneral
=
new
HashMap
<>();
ArrayList
<
String
>
orderDataList
=
new
ArrayList
<>();
ArrayList
<
String
>
orderIdList
=
new
ArrayList
<>();
ArrayList
<
String
>
orderIdList
=
new
ArrayList
<>();
HashMap
<
String
,
Object
>
mapMongo
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
mapMongo
=
new
HashMap
<>();
...
@@ -1032,7 +1033,8 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -1032,7 +1033,8 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
mapMongo
.
put
(
"status"
,
KylinTableStatusConst
.
ORDER_STATUS2
);
mapMongo
.
put
(
"status"
,
KylinTableStatusConst
.
ORDER_STATUS2
);
mapMongo
.
put
(
"updatedAt"
,
DateUtil
.
Formatter
.
yyyyMMddHHmmssSSS
.
format
(
now
));
mapMongo
.
put
(
"updatedAt"
,
DateUtil
.
Formatter
.
yyyyMMddHHmmssSSS
.
format
(
now
));
mapMongo
.
put
(
"changeDate"
,
now
);
mapMongo
.
put
(
"changeDate"
,
now
);
orderIdList
.
add
(
item
.
getOrderTicketsId
()
+
","
+
item
.
getUserId
());
orderDataList
.
add
(
item
.
getOrderTicketsId
()
+
","
+
item
.
getUserId
());
orderIdList
.
add
(
item
.
getUserId
());
mapSurplusGeneral
.
put
(
item
.
getTicketId
(),
mapSurplusGeneral
.
get
(
item
.
getTicketId
())
==
null
?
item
.
getNumber
()
:
mapSurplusGeneral
.
get
(
item
.
getTicketId
())
+
item
.
getNumber
());
mapSurplusGeneral
.
put
(
item
.
getTicketId
(),
mapSurplusGeneral
.
get
(
item
.
getTicketId
())
==
null
?
item
.
getNumber
()
:
mapSurplusGeneral
.
get
(
item
.
getTicketId
())
+
item
.
getNumber
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
debug
(
"CHECK TIME SYNC = "
+
e
.
getMessage
());
log
.
debug
(
"CHECK TIME SYNC = "
+
e
.
getMessage
());
...
@@ -1044,7 +1046,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -1044,7 +1046,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
}
}
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"FOR 循环 -> time:"
+
(
currentTime
)
+
"毫秒"
);
log
.
debug
(
"FOR 循环 -> time:"
+
(
currentTime
)
+
"毫秒"
);
if
(
order
Id
List
.
size
()
>
0
)
{
if
(
order
Data
List
.
size
()
>
0
)
{
//库存
//库存
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
mapSurplusGeneral
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
mapSurplusGeneral
.
entrySet
())
{
dataUtils
.
changeSurplusGeneral
(
entry
.
getKey
(),
entry
.
getValue
());
dataUtils
.
changeSurplusGeneral
(
entry
.
getKey
(),
entry
.
getValue
());
...
@@ -1055,7 +1057,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -1055,7 +1057,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
//mysql
//mysql
String
orderStr
=
""
;
String
orderStr
=
""
;
for
(
int
i
=
0
;
i
<
orderIdList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
orderIdList
.
size
();
i
++)
{
String
orderTicketId
=
orderIdList
.
get
(
i
)
.
split
(
","
)[
0
]
;
String
orderTicketId
=
orderIdList
.
get
(
i
);
orderStr
+=
"'"
+
orderTicketId
+
"',"
;
orderStr
+=
"'"
+
orderTicketId
+
"',"
;
}
}
...
@@ -1081,7 +1083,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
...
@@ -1081,7 +1083,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
Thread
thread
=
new
Thread
(()
->
{
Thread
thread
=
new
Thread
(()
->
{
//redis 列表
//redis 列表
order
Id
List
.
forEach
(
t
->
{
order
Data
List
.
forEach
(
t
->
{
String
orderTicketId
=
t
.
split
(
","
)[
0
];
String
orderTicketId
=
t
.
split
(
","
)[
0
];
String
uid
=
t
.
split
(
","
)[
1
];
String
uid
=
t
.
split
(
","
)[
1
];
KylinOrderTicketVo
vo
=
dataUtils
.
getOrderTicketVo
(
orderTicketId
);
KylinOrderTicketVo
vo
=
dataUtils
.
getOrderTicketVo
(
orderTicketId
);
...
...
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