我项目前台的页面用的miniui的datagrid,后台通的sqlserver数据库。我现在用教程离得分页得方法以后,在前台展示的时候,分页无效,但是分页菜单的数据都正常
@IocBean(args = {"refer:dao"})
public class BaseModuleService extends Service<BaseModule> {
public BaseModuleService(Dao dao) {
super(dao);
}
public QueryResult findAllModuleList(String encode,String fullname,Pager pager){
Cnd wherecondition=Cnd.where(new Static("1=1"));
if(!"".equals(encode)&&encode!=null){
wherecondition.and("encode","like", "%"+encode+"%");
}
if(!"".equals(fullname)&&fullname!=null){
wherecondition.and("fullname","like", "%"+fullname+"%");
}
QueryResult qr=new QueryResult();
List<BaseModule> list = dao().query(BaseModule.class, wherecondition);
qr.setList(list);
pager.setRecordCount(dao().count(BaseModule.class, wherecondition));
qr.setPager(pager);
return qr;
}