|
@@ -1,6 +1,7 @@
|
|
|
package com.persagy.fm.common.model.dto;
|
|
|
|
|
|
import lombok.Data;
|
|
|
+import net.minidev.json.annotate.JsonIgnore;
|
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
import java.util.List;
|
|
@@ -21,5 +22,15 @@ public class PageDTO {
|
|
|
private Integer size;
|
|
|
|
|
|
private List<Sort> orders;
|
|
|
+
|
|
|
+ @JsonIgnore
|
|
|
+ private Integer startIndex;
|
|
|
+
|
|
|
+ public Integer getStartIndex() {
|
|
|
+ if (page == null || size == null) {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ return (page -1) * size;
|
|
|
+ }
|
|
|
}
|
|
|
|