diff --git a/gather_program/bin/resources/log4j.xml b/gather_program/bin/resources/log4j.xml index c902410..cad5b8f 100644 --- a/gather_program/bin/resources/log4j.xml +++ b/gather_program/bin/resources/log4j.xml @@ -2,60 +2,39 @@ - - - - - - + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - + + + + + + \ No newline at end of file diff --git a/gather_program/src/main/java/org/ossean/gather/process/GatherThread.java b/gather_program/src/main/java/org/ossean/gather/process/GatherThread.java index a07eb7a..7149774 100644 --- a/gather_program/src/main/java/org/ossean/gather/process/GatherThread.java +++ b/gather_program/src/main/java/org/ossean/gather/process/GatherThread.java @@ -78,7 +78,7 @@ public class GatherThread implements Runnable { idsIncrement = conf.getIdsIncrement(); idsBegin = readPointer(conf.getPointerTableName(), sourceTableName, conf.getTargetTableName()); - idsEnd = maxId = pointerDao.getMaxId(sourceTableName); + idsEnd = maxId = gatherDao.getMaxId(sourceTableName); while (idsBegin < idsEnd) { beginId = idsBegin; endId = beginId + idsIncrement - 1; // 取数据时两边都取等号 diff --git a/gather_program/src/main/java/org/ossean/gather/targetDao/PointerDao.java b/gather_program/src/main/java/org/ossean/gather/targetDao/PointerDao.java index 9ba87ea..613879c 100644 --- a/gather_program/src/main/java/org/ossean/gather/targetDao/PointerDao.java +++ b/gather_program/src/main/java/org/ossean/gather/targetDao/PointerDao.java @@ -7,13 +7,13 @@ import org.apache.ibatis.annotations.Update; public interface PointerDao { - // 读取表中最小id值 - @Select("select min(id) from ${table}") - public int getMinId(@Param("table") String table); - - // 读取表中最大id值 - @Select("select max(id) from ${table}") - public int getMaxId(@Param("table") String table); +// // 读取表中最小id值 +// @Select("select min(id) from ${table}") +// public int getMinId(@Param("table") String table); +// +// // 读取表中最大id值 +// @Select("select max(id) from ${table}") +// public int getMaxId(@Param("table") String table); @Select("select Pointer from ${table} where SourceTableName=#{SourceTableName} and TargetTableName=#{TargetTableName}") public int getPointer(@Param("table") String table, diff --git a/gather_program/src/main/resource/applicationContext-myBatis.xml b/gather_program/src/main/resource/applicationContext-myBatis.xml index 58d2329..1eb0005 100644 --- a/gather_program/src/main/resource/applicationContext-myBatis.xml +++ b/gather_program/src/main/resource/applicationContext-myBatis.xml @@ -21,7 +21,7 @@ - + @@ -41,7 +41,7 @@ - +