自定义SQL中,我想在回调里面传入相应的参数,怎么传,是只能自己重写吗?
public List rptExplainExportExcel(String dzzId, String annualId, String explainId) {
//先获得SQL
RptTemplateExplain rptTemplateExplain = reportTemplateExplainService.getARptTemplateExplain(explainId);
String querySql = rptTemplateExplain.getExportExcelSql();
String columnNum = rptTemplateExplain.getExportExcelLength();
Sql sql = Sqls.create(querySql);
sql.params().set("dzzId", dzzId);
//根据SQL先查出来该张报表的所有审核信息
sql.setCallback(new SqlCallback() {
public Object invoke(Connection conn, ResultSet rs, Sql sql) throws SQLException {
List<ReportExplainFillEntity> reportExplainFillEntityList = new ArrayList<ReportExplainFillEntity>();
while (rs.next()) {
RptExplainExportExcel rptExplainExportExcel = new RptExplainExportExcel();
for (int a = 1; a <= Integer.parseInt(columnNum); a++) {
}
}
return reportExplainFillEntityList;
}
});
}
columnNum 是我想往回调里面传的参数