zhouhao преди 7 години
родител
ревизия
24bb447929
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      hsweb-commons/hsweb-commons-entity/src/main/java/org/hswebframework/web/commons/entity/PagerResult.java

+ 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;