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;