feat(dao-support、common): IPageReq,支持指定不查询分页count。step2
This commit is contained in:
parent
54f135f94f
commit
f2428ffe31
@ -4,6 +4,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -11,8 +12,14 @@ import java.util.List;
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PageReq implements IPageReq{
|
||||
public class PageReq implements IPageReq {
|
||||
Integer page;
|
||||
Integer pageSize;
|
||||
Boolean searchCount;
|
||||
List<String> sort;
|
||||
|
||||
public Boolean isSearchCount() {
|
||||
// 只要不明确指定 searchCount = false,都要查count信息
|
||||
return BooleanUtils.isNotFalse(searchCount);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user