private int getTotal(Class<?> clazz) {
        StringBuilder sql = new StringBuilder();
        sql.append(SQLUtils.getSelectCountSQL(clazz));
        sql.append(SQLUtils.autoSetSoftDeleted("", clazz));

        log(sql);
        long start = System.currentTimeMillis();
        int rows = jdbcTemplate.queryForObject(sql.toString(), Integer.class);

        long cost = System.currentTimeMillis() - start;
        logSlow(cost, sql.toString(), null);
        return rows;
    }
private int getTotal ( Class < ? > clazz ) { StringBuilder sql = new StringBuilder ( ) ; sql . append ( SQLUtils . getSelectCountSQL ( clazz ) ) ; sql . append ( SQLUtils . autoSetSoftDeleted ( "" , clazz ) ) ; log ( sql ) ; long start = System . currentTimeMillis ( ) ; int rows = jdbcTemplate . queryForObject ( sql . toString ( ) , Integer . class ) ; long cost = System . currentTimeMillis ( ) - start ; logSlow ( cost , sql . toString ( ) , null ) ; return rows ; }
查询列表总数。
0.3.1+版本起，带条件的count不使用count(*)计算总数，
而改用FOUND_ROWS()，目的是统一group by等复杂子句的总数计算方式。
@param clazz
@return