public void buildPagerModelQuery(PagerModel pagerModel, BaseDto dto) { LogConfigDto logConfigDto = (LogConfigDto) dto; LogConfigure logConfigure = logConfigDto.getLogConfigure(); // 按主键来统计记录数,如有必要可以手动指定其他属性, // 如多对像连查时,且主建名相同,这时就要手动加上"别名.主键名"形式 pagerModel.setCountProName(super.getIdName(LogConfigure.class)); StringBuilder hqlStr = new StringBuilder(); Map<String, Object> hqlParamMap = new HashMap<String, Object>(); buildQuery(hqlParamMap, logConfigure, hqlStr); pagerModel.setQueryHql(hqlStr.toString()); pagerModel.setHqlParamMap(hqlParamMap); }
/* (非 Javadoc) * <p>Title: findGateway</p> * <p>Description: </p> * @param pagerModel * @see com.dhcc.pms.service.platformManage.GatewayService#findGateway(com.dhcc.framework.common.PagerModel) */ @Override public void findGateway(PagerModel pagerModel, GatewayDto gatewayDto) { // TODO Auto-generated method stub gatewayDao.buildPagerModelQuery(pagerModel, gatewayDto); commonService.fillPagerModelData(pagerModel); log.info("\n===========Num==========\n" + pagerModel.getPageData().size()); }