|
楼主 |
发表于 2018-4-23 14:42:56
|
显示全部楼层
admin 发表于 2018-4-16 17:43
你的意思跑到第二页,点击查询有问题?
在CgReportController.java 中增加即可解决该问题:
if(StringUtils.isNotBlank(dbKey)){
querySql=SqlUtil.getFullSql(querySql,queryparams);//duchao 20180423 add to support query
result= DynamicDBUtil.findList(dbKey,SqlUtil.jeecgCreatePageSql(dbKey,querySql,queryparams,p,r));
Map map=(Map)DynamicDBUtil.findOne(dbKey,SqlUtil.getCountSql(querySql,null));
if(map.get("COUNT(*)") instanceof BigDecimal){
BigDecimal count = (BigDecimal)map.get("COUNT(*)");
size = count.longValue();
}else{
size=(Long)map.get("COUNT(*)");
}
}else{
result= cgReportService.queryByCgReportSql(querySql, queryparams, p, r);
size = cgReportService.countQueryByCgReportSql(querySql, queryparams);
} |
|