记得上下班打卡 | 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
2b263d07
Commit
2b263d07
authored
Jun 20, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 脚本库存脚本
parent
d8e810b1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
41 deletions
+45
-41
KylinOrderTicketsServiceImpl.java
...vice/kylin/service/impl/KylinOrderTicketsServiceImpl.java
+45
-41
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 @
2b263d07
...
...
@@ -1078,16 +1078,16 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
}
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"FOR 循环 -> time:"
+
(
currentTime
)
+
"毫秒"
);
if
(
orderIdList
.
size
()
>
0
)
{
//库存
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
mapSurplusGeneral
.
entrySet
())
{
dataUtils
.
changeSurplusGeneral
(
entry
.
getKey
(),
entry
.
getValue
());
}
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"redis 库存 -> time:"
+
(
currentTime
)
+
"毫秒"
);
//mysql
LinkedList
<
String
>
sqls
=
new
LinkedList
<>();
//mysql
String
orderStr
=
""
;
for
(
int
i
=
0
;
i
<
orderIdList
.
size
();
i
++)
{
String
orderTicketId
=
orderIdList
.
get
(
i
).
split
(
","
)[
0
];
...
...
@@ -1106,6 +1106,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
);
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"mongo -> time:"
+
(
currentTime
)
+
"毫秒"
);
//redis 列表
orderIdList
.
forEach
(
t
->
{
String
orderTicketId
=
t
.
split
(
","
)[
0
];
...
...
@@ -1121,6 +1122,9 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
});
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"redis 列表 限购 -> time:"
+
(
currentTime
)
+
"毫秒"
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
...
...
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