Commit f022fa80 by Java - 段鹏举

同步录音获取foc最大值出错时默认值修改

parent d8c8d581
......@@ -3,17 +3,6 @@
*/
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.HistoryConfig;
import com.foc.fetcher.HCFetcher;
......@@ -22,6 +11,10 @@ import com.foc.sound.service.SoundService;
import com.foc.util.DBHelper;
import com.foc.util.DateUtil;
import java.sql.*;
import java.util.*;
import java.util.Date;
/**
* # 每分钟同步一次安科录音记录(直接读取安科数据库)
* *#1 * * * * root bash /mnt/foc/project/task/rundbsounds.sh
......@@ -70,8 +63,9 @@ public class SoundDbTaskMain {
}
// service.updateSoundmaxId(minId);
} else{
Long minId = service.getSoundMaxId(0L)+1;
// 获取soundMaxId出错时不应从0开始,退出本次运行即可,不影响下次同步
// Long minId = service.getSoundMaxId(0L)+1;
Long minId = service.getSoundMaxId(Long.MAX_VALUE);
System.out.println("minId:["+minId+"]");
Long maxId = getMaxIdFromAnke(1L);
System.out.println("maxId:["+maxId+"]大概["+(maxId-minId+1)+"]条");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment