Commit b784732d by 吴佳

dbReadset 分页查询总条数调整

parent 1e6c5534
......@@ -14,6 +14,7 @@ import com.brilliance.mda.support.mybatis.config.MybatisDbUtil;
import com.brilliance.mda.support.mybatis.count.CounterService;
import com.brilliance.mda.support.mybatis.dync.mapper.DbExecuteMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import jdk.nashorn.internal.ir.annotations.Ignore;
import net.sf.jsqlparser.JSQLParserException;
import net.sf.jsqlparser.parser.CCJSqlParserUtil;
......@@ -268,7 +269,9 @@ public class MyBatisDaoSession extends AbstractDaoSession implements IDaoSession
//调用commonMapper中的dyncRead
List<HashMap<String , Object>> result = sqlSessionTemplate.selectList("com.brilliance.mda.support.mybatis.count.mapper.CommonMapper.dyncRead",
adapter.getSqlParams());
PageInfo<HashMap<String , Object>> pageInfo = new PageInfo<HashMap<String , Object>>(result);
long total = pageInfo.getTotal();
baseVO.setTotal(total);
if(result != null && result.size()>0){
String fieldName = "";
String methodName = "";
......@@ -356,7 +359,6 @@ public class MyBatisDaoSession extends AbstractDaoSession implements IDaoSession
if (cacheOption != null) {
PageHelper.clearPage();
}
baseVO.setTotal(lists[0].size());
return lists[0].size();
}
......
......@@ -12,7 +12,7 @@ public class BaseVO {
protected String id;
protected String cifno;
protected String pageId;
public int total;
public long total;
protected Map<String, Object> params;
protected Map<String, Object> root;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment