我的sql
public List doListForPager(HttpServletRequest request, int pageSize,
String pageFormat, Map map) {
if(map != null && "true".equals(map.get("export"))){
return baseDao.queryForList(getQuerySQL(map)[2]);
}else{
return baseDao.findAllRecordForPager(request, pageSize, getQuerySQL(map), pageFormat);
}
}
public String[] getQuerySQL(Map map) {
String sql = getWhereSQL(map);
String sql_export = "select h.*,row_number() over(order by h.year desc, h.staff_code, h.id desc) row_num from hisattend h where rownum<=10000";
String array[]={sql_export};
return array;
}
public String getWhereSQL(Map map) {
StringBuffer buffer = new StringBuffer(" where 1=1 ");
return buffer.toString();
}
action
public String doExcel() throws Exception{
map = getMap(getRequest());
map.put("export", "true");
list = historyAttendService.doListForPager(null, 0, "", map);
return SUCCESS;
}
jsp
//导出
function expData() {
var url = "<%=basePath%>attend/history/history_doExcel.action";
$("#searchForm").attr("action",url);
$("#searchForm").submit();
}
<%@ include file="/commons/page.jsp"%>
page.jsp
${requestScope.pagetool}
请问下如何分页导出 数据有20万条,我一次导出一万,第二次点导出的时候导出的还是前一万记录,请问怎么可以接着导出?