DataGrid dataGrid = new DataGrid();
dataGrid.setPage(p);
dataGrid.setRows(r);
dataGrid.setOrder("desc");
dataGrid.setSort("createDate");
CriteriaQuery query = null;
if("1".equals(page.type)){//收入列表
query=new CriteriaQuery(FinaRechargeEntity.class, dataGrid);
}else if("2".equals(page.type)){//支出列表
query=new CriteriaQuery(FinaConsumeEntity.class, dataGrid);
}
//查询当前用户
query.add(Restrictions.eq("userId",user.getId()));
query.setPageSize(r);//在request中没有传rows属性,jeecg会默认给定rows为10000,WTF!
query.add();
systemService.getDataGridReturn(query, true);