Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
baihang-report
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
data-spider
baihang-report
Commits
a1f4ac15
Commit
a1f4ac15
authored
Jan 02, 2020
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检测tidb的call_record表数据是否有重复数据工具
parent
8b2ffc20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
CleanningTransactionLogService.java
...rt/service/manualTool/CleanningTransactionLogService.java
+5
-4
No files found.
src/main/java/cn/quantgroup/report/service/manualTool/CleanningTransactionLogService.java
View file @
a1f4ac15
...
...
@@ -794,6 +794,7 @@ public class CleanningTransactionLogService {
for
(
int
i
=
0
;
i
<
tidbCallRecordCFList
.
size
();
i
++)
{
//ee86810a076d45d58a5d87d7cfc60e8f,032f14da-b905-4a1c-9c38-9db3dd0b1304,ZhiChengAFuAntiFraud,1004,2019-12-24 21:48:53
log
.
info
(
"删除重复数据ST:"
+
i
);
String
[]
arry
=
tidbCallRecordCFList
.
get
(
i
).
trim
().
split
(
","
);
Stopwatch
callRStopwatch
=
Stopwatch
.
createStarted
();
...
...
@@ -817,10 +818,10 @@ public class CleanningTransactionLogService {
String
sql
=
DELETE_CALL_SQL
.
replace
(
"##ID##"
,
""
+
bean1
.
getId
());
sql
=
sql
.
replace
(
"##TRANSACTION_ID##"
,
bean1
.
getTransactionId
());
try
{
FileUtils
.
write
(
new
File
(
bakFileName
),
JSON
.
toJSONString
(
bean1
)+
"\r\n"
,
"UTF-8"
,
true
);
int
update
=
tidbRiskJdbcTemplate
.
update
(
sql
);
log
.
info
(
"删除bean1成功, sql: {} ,update: {} "
,
sql
,
update
);
FileUtils
.
write
(
new
File
(
bakFileName
),
JSON
.
toJSONString
(
bean1
)+
"\r\n"
,
"UTF-8"
,
true
);
}
catch
(
IOException
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"删除bean1数据是不, sql: {} "
,
sql
,
e
);
}
...
...
@@ -831,10 +832,10 @@ public class CleanningTransactionLogService {
String
sql
=
DELETE_CALL_SQL
.
replace
(
"##ID##"
,
""
+
bean2
.
getId
());
sql
=
sql
.
replace
(
"##TRANSACTION_ID##"
,
bean2
.
getTransactionId
());
try
{
FileUtils
.
write
(
new
File
(
bakFileName
),
JSON
.
toJSONString
(
bean2
)+
"\r\n"
,
"UTF-8"
,
true
);
int
update
=
tidbRiskJdbcTemplate
.
update
(
sql
);
log
.
info
(
"删除bean2成功, sql: {} , update: {} "
,
sql
,
update
);
FileUtils
.
write
(
new
File
(
bakFileName
),
JSON
.
toJSONString
(
bean2
)+
"\r\n"
,
"UTF-8"
,
true
);
}
catch
(
IOException
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"删除bean2数据是不, sql: {} "
,
sql
,
e
);
}
...
...
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