Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
task2.0
Overview
Overview
Details
Activity
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
首航-临时账号
task2.0
Commits
f022fa80
Commit
f022fa80
authored
Oct 09, 2017
by
Java - 段鹏举
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步录音获取foc最大值出错时默认值修改
parent
d8c8d581
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
+7
-13
SoundDbTaskMain.java
src/com/foc/task/SoundDbTaskMain.java
+7
-13
No files found.
src/com/foc/task/SoundDbTaskMain.java
View file @
f022fa80
...
@@ -3,17 +3,6 @@
...
@@ -3,17 +3,6 @@
*/
*/
package
com
.
foc
.
task
;
package
com
.
foc
.
task
;
import
java.sql.Connection
;
import
java.sql.DriverManager
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.foc.conf.GConstants
;
import
com.foc.conf.GConstants
;
import
com.foc.conf.HistoryConfig
;
import
com.foc.conf.HistoryConfig
;
import
com.foc.fetcher.HCFetcher
;
import
com.foc.fetcher.HCFetcher
;
...
@@ -22,6 +11,10 @@ import com.foc.sound.service.SoundService;
...
@@ -22,6 +11,10 @@ import com.foc.sound.service.SoundService;
import
com.foc.util.DBHelper
;
import
com.foc.util.DBHelper
;
import
com.foc.util.DateUtil
;
import
com.foc.util.DateUtil
;
import
java.sql.*
;
import
java.util.*
;
import
java.util.Date
;
/**
/**
* # 每分钟同步一次安科录音记录(直接读取安科数据库)
* # 每分钟同步一次安科录音记录(直接读取安科数据库)
* *#1 * * * * root bash /mnt/foc/project/task/rundbsounds.sh
* *#1 * * * * root bash /mnt/foc/project/task/rundbsounds.sh
...
@@ -70,8 +63,9 @@ public class SoundDbTaskMain {
...
@@ -70,8 +63,9 @@ public class SoundDbTaskMain {
}
}
// service.updateSoundmaxId(minId);
// service.updateSoundmaxId(minId);
}
else
{
}
else
{
// 获取soundMaxId出错时不应从0开始,退出本次运行即可,不影响下次同步
Long
minId
=
service
.
getSoundMaxId
(
0L
)+
1
;
// Long minId = service.getSoundMaxId(0L)+1;
Long
minId
=
service
.
getSoundMaxId
(
Long
.
MAX_VALUE
);
System
.
out
.
println
(
"minId:["
+
minId
+
"]"
);
System
.
out
.
println
(
"minId:["
+
minId
+
"]"
);
Long
maxId
=
getMaxIdFromAnke
(
1L
);
Long
maxId
=
getMaxIdFromAnke
(
1L
);
System
.
out
.
println
(
"maxId:["
+
maxId
+
"]大概["
+(
maxId
-
minId
+
1
)+
"]条"
);
System
.
out
.
println
(
"maxId:["
+
maxId
+
"]大概["
+(
maxId
-
minId
+
1
)+
"]条"
);
...
...
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