From d85cf4a39daee29d07c9aab284a34cedee1a964c Mon Sep 17 00:00:00 2001 From: zhouhao Date: Wed, 12 Jul 2017 21:30:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Eempty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/hswebframework/web/commons/entity/PagerResult.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hsweb-commons/hsweb-commons-entity/src/main/java/org/hswebframework/web/commons/entity/PagerResult.java b/hsweb-commons/hsweb-commons-entity/src/main/java/org/hswebframework/web/commons/entity/PagerResult.java index e53102510..4df6a51f6 100644 --- a/hsweb-commons/hsweb-commons-entity/src/main/java/org/hswebframework/web/commons/entity/PagerResult.java +++ b/hsweb-commons/hsweb-commons-entity/src/main/java/org/hswebframework/web/commons/entity/PagerResult.java @@ -22,11 +22,17 @@ package org.hswebframework.web.commons.entity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.util.Collections; import java.util.List; @ApiModel(description = "分页结果") public class PagerResult implements Entity { private static final long serialVersionUID = -6171751136953308027L; + + public static PagerResult empty(){ + return new PagerResult<>(0, Collections.emptyList()); + } + private int total; private List data;