public <R> WebPageResult<R> mapToWeb(Function<T, R> mapper) {
        List<R> returnData = hasData(this) ? getData().stream().map(mapper).collect(Collectors.toList())
            : Collections.emptyList();
        WebPageResult<R> pageResult = new WebPageResult<>();
        pageResult.setSuccess(getSuccess());
        pageResult.setErrorCode(getErrorCode());
        pageResult.setErrorMessage(getErrorMessage());
        pageResult.setTraceId(getTraceId());
        // Reset a paging information
        Page<R> page = new Page<>();
        pageResult.setData(page);
        page.setData(returnData);
        page.setPageNo(getPageNo());
        page.setPageSize(getPageSize());
        page.setTotal(getTotal());
        pageResult.setData(page);
        return pageResult;
    }
Convert the current type to another type
and converted to web type
Note here that if the current project also uses <code>PageResult</code> in the web layer, you can directly use the <code>map</code> method interface.

@param mapper conversion method
@param <R> Return type
@return paging return object
chat2db-server/chat2db-server-tools/chat2db-server-tools-base/src/main/java/ai/chat2db/server/tools/base/wrapper/result/PageResult.java