|
@@ -121,7 +121,7 @@ public class DaoImpl implements Dao { |
|
@@ -121,7 +121,7 @@ public class DaoImpl implements Dao { |
121
|
String SQL_FMT = "select FID,CONTENT from MESSAGE_BAK WHERE (FID>%s and FID<%s+%s) AND (TYPE='CLR' OR TYPE='ES1' OR TYPE='IS1' OR STYP = 'BSTA' OR STYP = 'FZE_RCF' OR STYP = 'FSU_FOH' OR STYP = 'FSU_DEP' OR STYP = 'COST' OR STYP = 'ABME' OR STYP = 'FZE_DEP' OR STYP = 'FSU_RCF') ORDER BY FID ";
|
121
|
String SQL_FMT = "select FID,CONTENT from MESSAGE_BAK WHERE (FID>%s and FID<%s+%s) AND (TYPE='CLR' OR TYPE='ES1' OR TYPE='IS1' OR STYP = 'BSTA' OR STYP = 'FZE_RCF' OR STYP = 'FSU_FOH' OR STYP = 'FSU_DEP' OR STYP = 'COST' OR STYP = 'ABME' OR STYP = 'FZE_DEP' OR STYP = 'FSU_RCF') ORDER BY FID ";
|
122
|
//从配置文件读取sql语句
|
122
|
//从配置文件读取sql语句
|
123
|
String sql_select=ConfigUtils.SQl;
|
123
|
String sql_select=ConfigUtils.SQl;
|
124
|
- String sql = String.format(sql_select, fid, fid, ConfigUtils.RECORD_COUNT);
|
124
|
+ String sql = String.format(sql_select, fid, fid, ConfigUtils.RECORD_COUNT); //这里修改从FID_INDEX文件读取的FID ,改为取搜索结果的rownum
|
125
|
logger.info(sql);
|
125
|
logger.info(sql);
|
126
|
final LobHandler lobHandler = new DefaultLobHandler();
|
126
|
final LobHandler lobHandler = new DefaultLobHandler();
|
127
|
final ArrayList xmlList = new ArrayList();
|
127
|
final ArrayList xmlList = new ArrayList();
|
|
@@ -130,12 +130,13 @@ public class DaoImpl implements Dao { |
|
@@ -130,12 +130,13 @@ public class DaoImpl implements Dao { |
130
|
this.jdbcTemplate.query(sql, new AbstractLobStreamingResultSetExtractor() {
|
130
|
this.jdbcTemplate.query(sql, new AbstractLobStreamingResultSetExtractor() {
|
131
|
protected void streamData(ResultSet rs) throws SQLException, IOException, DataAccessException {
|
131
|
protected void streamData(ResultSet rs) throws SQLException, IOException, DataAccessException {
|
132
|
String content = "";
|
132
|
String content = "";
|
133
|
-
|
133
|
+ int rownum=0;
|
134
|
while(rs.next()) {
|
134
|
while(rs.next()) {
|
135
|
int fid = rs.getInt(1);
|
135
|
int fid = rs.getInt(1);
|
136
|
content = lobHandler.getClobAsString(rs, "CONTENT");
|
136
|
content = lobHandler.getClobAsString(rs, "CONTENT");
|
|
|
137
|
+ rownum = rs.getInt("rownum_");
|
137
|
if (content != null) {
|
138
|
if (content != null) {
|
138
|
- MessageBak obj = new MessageBak(fid, content);
|
139
|
+ MessageBak obj = new MessageBak(fid, content,rownum);
|
139
|
xmlList.add(obj);
|
140
|
xmlList.add(obj);
|
140
|
} else {
|
141
|
} else {
|
141
|
DaoImpl.logger.error("FID=" + fid + " content is NULL");
|
142
|
DaoImpl.logger.error("FID=" + fid + " content is NULL");
|