zhouhao 7 年之前
父节点
当前提交
24bb447929

+ 3 - 0
hsweb-commons/hsweb-commons-entity/src/main/java/org/hswebframework/web/commons/entity/PagerResult.java

@@ -33,6 +33,9 @@ public class PagerResult<E> implements Entity {
         return new PagerResult<>(0, Collections.emptyList());
     }
 
+    public static <E> PagerResult<E> of(int total,List<E> list){
+        return new PagerResult<>(total,list);
+    }
     private int total;
 
     private List<E> data;