public int count(String sql, Object[] params) {
				
		int rowCount = 0;
		try{
			Map<String, Object> resultMap = null;
			if (params == null || params.length == 0) {
				resultMap = getProxy().queryForMap(sql);
			} else {
				resultMap = getProxy().queryForMap(sql, params);
			}
			Iterator<Map.Entry<String, Object>> it = resultMap.entrySet().iterator();
			if(it.hasNext()){
				Map.Entry<String, Object> entry = it.next();
				rowCount = ((Long)entry.getValue()).intValue();
			}
		}catch(EmptyResultDataAccessException e){
			
		}
		
		
		return rowCount;
	}
public int count ( String sql , Object [ ] params ) { int rowCount = 0 ; try { Map < String , Object > resultMap = null ; if ( params == null || params . length == 0 ) { resultMap = getProxy ( ) . queryForMap ( sql ) ; } else { resultMap = getProxy ( ) . queryForMap ( sql , params ) ; } Iterator < Map . Entry < String , Object > > it = resultMap . entrySet ( ) . iterator ( ) ; if ( it . hasNext ( ) ) { Map . Entry < String , Object > entry = it . next ( ) ; rowCount = ( ( Long ) entry . getValue ( ) ) . intValue ( ) ; } } catch ( EmptyResultDataAccessException e ) { } return rowCount ; }
获取总行数
get count
@param sql
@param params
@return