This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
package org.redkale.source;
|
package org.redkale.source;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import org.redkale.convert.ConvertColumn;
|
||||||
import org.redkale.util.Comment;
|
import org.redkale.util.Comment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -20,12 +21,15 @@ public final class Flipper implements Serializable, Cloneable {
|
|||||||
|
|
||||||
public static int DEFAULT_LIMIT = 20;
|
public static int DEFAULT_LIMIT = 20;
|
||||||
|
|
||||||
@Comment("每页多少行")
|
@ConvertColumn(index = 1)
|
||||||
private int limit = DEFAULT_LIMIT;
|
|
||||||
|
|
||||||
@Comment("记录行的偏移量,从0开始")
|
@Comment("记录行的偏移量,从0开始")
|
||||||
private int offset = 0;
|
private int offset = 0;
|
||||||
|
|
||||||
|
@ConvertColumn(index = 2)
|
||||||
|
@Comment("每页多少行")
|
||||||
|
private int limit = DEFAULT_LIMIT;
|
||||||
|
|
||||||
|
@ConvertColumn(index = 3)
|
||||||
@Comment("排序字段, 可多字段排序")
|
@Comment("排序字段, 可多字段排序")
|
||||||
private String sort = "";
|
private String sort = "";
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ package org.redkale.util;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.*;
|
import java.util.function.*;
|
||||||
import java.util.stream.*;
|
import java.util.stream.*;
|
||||||
|
import org.redkale.convert.ConvertColumn;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页集合。 结构由一个total总数和一个List列表组合而成。
|
* 页集合。 结构由一个total总数和一个List列表组合而成。
|
||||||
@@ -21,8 +22,10 @@ import java.util.stream.*;
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public class Sheet<T> implements java.io.Serializable, Iterable<T> {
|
public class Sheet<T> implements java.io.Serializable, Iterable<T> {
|
||||||
|
|
||||||
|
@ConvertColumn(index = 1)
|
||||||
private long total = -1;
|
private long total = -1;
|
||||||
|
|
||||||
|
@ConvertColumn(index = 2)
|
||||||
private Collection<T> rows;
|
private Collection<T> rows;
|
||||||
|
|
||||||
public Sheet() {
|
public Sheet() {
|
||||||
@@ -62,6 +65,7 @@ public class Sheet<T> implements java.io.Serializable, Iterable<T> {
|
|||||||
*
|
*
|
||||||
* @return 是否为空
|
* @return 是否为空
|
||||||
*/
|
*/
|
||||||
|
@ConvertColumn(index = 3)
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
return this.rows == null || this.rows.isEmpty();
|
return this.rows == null || this.rows.isEmpty();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user