这是原方法:
l=Db.paginate(Integer.parseInt(page),Integer.parseInt(limit),"select f_id,f_pro_name_1,f_start_year,f_end_year,f_fund_source,f_fund_perfor,f_por_basis,f_build_content,f_exp_orien,f_cent_office,f_manager_dep,f_distribution,f_add_time,f_remarker,f_No","from sys_fund");
打印出来的SQL
Sql: SELECT * FROM ( SELECT row_number() over (order by tempcolumn) temprownumber, * FROM ( SELECT TOP 10 tempcolumn=0, f_id,f_pro_name_1,f_start_year,f_end_year,f_fund_source,f_fund_perfor,f_por_basis,f_build_content,f_exp_orien,f_cent_office,f_manager_dep,f_distribution,f_add_time,f_remarker,f_No from sys_fund)vip)mvp where temprownumber>0
这是报错信息:
[ERROR]-[Thread: XNIO-1 task-30]-[com.jfinal.core.ActionHandler.handle()]: com.gsgc.controller.fundmanager.FundSetController.findFundAll() : /fdset/findFundAll?page=1&limit=10
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM ( SELECT TOP 10 tempcolumn=0, f_id,f_pro_name_1,f_start_year,f_end_year,' at line 1