瀏覽代碼

采用builder方式

周浩 9 年之前
父節點
當前提交
3db5780e2c
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      hsweb-web-bean/src/main/java/org/hsweb/web/bean/common/PagerResult.java

+ 4 - 2
hsweb-web-bean/src/main/java/org/hsweb/web/bean/common/PagerResult.java

@@ -24,15 +24,17 @@ public class PagerResult<Po> implements Serializable {
         return total;
     }
 
-    public void setTotal(int total) {
+    public PagerResult<Po> setTotal(int total) {
         this.total = total;
+        return this;
     }
 
     public List<Po> getData() {
         return data;
     }
 
-    public void setData(List<Po> data) {
+    public PagerResult<Po> setData(List<Po> data) {
         this.data = data;
+        return this;
     }
 }