作者 朱兆平

已ROWNUM为基础,发送数据

... ... @@ -118,7 +118,6 @@ public class DaoImpl implements Dao {
}
public List<MessageBak> getRecordByFID(int fid) {
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 ";
//从配置文件读取sql语句
String sql_select=ConfigUtils.SQl;
String sql = String.format(sql_select, fid, fid, ConfigUtils.RECORD_COUNT); //这里修改从FID_INDEX文件读取的FID ,改为取搜索结果的rownum
... ... @@ -130,11 +129,10 @@ public class DaoImpl implements Dao {
this.jdbcTemplate.query(sql, new AbstractLobStreamingResultSetExtractor() {
protected void streamData(ResultSet rs) throws SQLException, IOException, DataAccessException {
String content = "";
int rownum=0;
while(rs.next()) {
int fid = rs.getInt(1);
content = lobHandler.getClobAsString(rs, "CONTENT");
rownum = rs.getInt("rownum_");
int rownum = rs.getInt("rownum_");
if (content != null) {
MessageBak obj = new MessageBak(fid, content,rownum);
xmlList.add(obj);
... ...