记得上下班打卡 | 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
aa45cdeb
Commit
aa45cdeb
authored
Jun 20, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 脚本库存脚本
parent
3904a201
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
18 deletions
+24
-18
KylinOrderTicketsServiceImpl.java
...vice/kylin/service/impl/KylinOrderTicketsServiceImpl.java
+24
-18
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 @
aa45cdeb
...
...
@@ -1094,10 +1094,12 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderStr
=
orderTicketId
+
","
;
}
orderStr
=
orderStr
.
substring
(
0
,
orderStr
.
length
()
-
1
);
sqls
.
add
(
SqlMapping
.
get
(
"UPDATE kylin_order_tickets SET updated_at = "
+
now
+
" WHERE order_tickets_id in ("
+
orderStr
+
") "
)
);
sqls
.
add
(
SqlMapping
.
get
(
"UPDATE kylin_order_ticket_status SET `status` = 2,updated_at = "
+
now
+
" WHERE order_id in ("
+
orderStr
+
") "
)
);
sqls
.
add
(
SqlMapping
.
get
(
"UPDATE kylin_order_ticket_relations SET updated_at = "
+
now
+
" WHERE order_id in ("
+
orderStr
+
")"
)
);
sqls
.
add
(
"UPDATE kylin_order_tickets SET updated_at = "
+
now
+
" WHERE order_tickets_id in ("
+
orderStr
+
") "
);
sqls
.
add
(
"UPDATE kylin_order_ticket_status SET `status` = 2,updated_at = "
+
now
+
" WHERE order_id in ("
+
orderStr
+
") "
);
sqls
.
add
(
"UPDATE kylin_order_ticket_relations SET updated_at = "
+
now
+
" WHERE order_id in ("
+
orderStr
+
")"
);
rabbitTemplate
.
convertAndSend
(
MQConst
.
EXCHANGES_LIQUIDNET_SQL_ORDER_CLOSE
,
MQConst
.
ROUTING_KEY_SQL_ORDER_CLOSE
,
SqlMapping
.
gets
(
sqls
));
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"mysql -> time:"
+
(
currentTime
)
+
"毫秒"
);
//mongo
mongoTemplate
.
getCollection
(
KylinOrderTicketVo
.
class
.
getSimpleName
()).
updateOne
(
...
...
@@ -1107,6 +1109,10 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"mongo -> time:"
+
(
currentTime
)
+
"毫秒"
);
redisLockUtil
.
unlock
(
lock
);
Thread
thread
=
new
Thread
(
new
Runnable
(){
public
void
run
(){
//redis 列表
orderIdList
.
forEach
(
t
->
{
String
orderTicketId
=
t
.
split
(
","
)[
0
];
...
...
@@ -1120,8 +1126,8 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
dataUtils
.
changeBuyInfo
(
items
.
getUserId
(),
items
.
getEnterIdCode
(),
items
.
getPerformanceId
(),
items
.
getTicketId
(),
-
1
);
}
});
currentTime
=
System
.
currentTimeMillis
()
-
currentTime
;
log
.
debug
(
"redis 列表 限购 -> time:"
+
(
currentTime
)
+
"毫秒"
);
}})
;
thread
.
start
(
);
}
...
...
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