public <R, F extends ThirdFunction<R, Integer, Integer, List<Sort>>> R get(F thirdFunction) {
        if (StringUtils.isBlank(sort)) {
            return thirdFunction.apply(PageUtils.page(page), PageUtils.size(size), Lists.newArrayList());
        }
        List<Sort> sorts = Arrays.stream(sort.split(",")).map(s -> {
            try {
                String[] split = s.split("-");
                if (split.length == 1) {
                    return new Sort(this.apply(split[0]), DESC);
                }
                String direction = split[1];
                direction = !DESC.equalsIgnoreCase(direction) && !ASC.equalsIgnoreCase(direction) ? DESC : direction;
                return new Sort(this.apply(split[0]), direction);
            } catch (Exception e) {
                log.error(e.getMessage(), e);
                return null;
            }
        }).collect(Collectors.toList());
        return thirdFunction.apply(PageUtils.page(page), PageUtils.size(size), sorts);
    }
public < R , F extends ThirdFunction < R , Integer , Integer , List < Sort > > > R get ( F thirdFunction ) { if ( StringUtils . isBlank ( sort ) ) { return thirdFunction . apply ( PageUtils . page ( page ) , PageUtils . size ( size ) , Lists . newArrayList ( ) ) ; } List < Sort > sorts = Arrays . stream ( sort . split ( "," ) ) . map ( s -> { try { String [ ] split = s . split ( "-" ) ; if ( split . length == 1 ) { return new Sort ( this . apply ( split [ 0 ] ) , DESC ) ; } String direction = split [ 1 ] ; direction = ! DESC . equalsIgnoreCase ( direction ) && ! ASC . equalsIgnoreCase ( direction ) ? DESC : direction ; return new Sort ( this . apply ( split [ 0 ] ) , direction ) ; } catch ( Exception e ) { log . error ( e . getMessage ( ) , e ) ; return null ; } } ) . collect ( Collectors . toList ( ) ) ; return thirdFunction . apply ( PageUtils . page ( page ) , PageUtils . size ( size ) , sorts ) ; }
解析page对象,若参数错误，默认desc

@param thirdFunction 解析函数
@param <R>           解析后的对象
@param <F>           function
@return 返回解析结果