提交 16048627 编写于 作者: ibiz4j's avatar ibiz4j

时区保险

上级 2c08c1bd
...@@ -98,6 +98,18 @@ public class TableSyncExService extends TableSyncServiceImpl { ...@@ -98,6 +98,18 @@ public class TableSyncExService extends TableSyncServiceImpl {
Timestamp lastTimestamp=DataObject.getTimestampValue(sync.getEtlTimestamp(),DataObject.getBeginDate()); Timestamp lastTimestamp=DataObject.getTimestampValue(sync.getEtlTimestamp(),DataObject.getBeginDate());
{
Calendar c = Calendar.getInstance();
c.setTime(lastTimestamp);
c.add(Calendar.HOUR, -8);
lastTimestamp=new java.sql.Timestamp(c.getTime().getTime());
}
QueryFilter filter=QueryFilter.createQuery(); QueryFilter filter=QueryFilter.createQuery();
if(sourceModel.getLastModifyField()!=null) if(sourceModel.getLastModifyField()!=null)
filter.ge(sourceModel.getLastModifyField().getColumnName(),lastTimestamp); filter.ge(sourceModel.getLastModifyField().getColumnName(),lastTimestamp);
...@@ -194,5 +206,6 @@ public class TableSyncExService extends TableSyncServiceImpl { ...@@ -194,5 +206,6 @@ public class TableSyncExService extends TableSyncServiceImpl {
DynamicDataSourceContextHolder.poll(); DynamicDataSourceContextHolder.poll();
} }
} }
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册