File tree 1 file changed +13
-0
lines changed
mapper/src/main/java/io/mybatis/mapper/example
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 19
19
import io .mybatis .common .util .Assert ;
20
20
import io .mybatis .mapper .BaseMapper ;
21
21
import io .mybatis .mapper .fn .Fn ;
22
+ import org .apache .ibatis .cursor .Cursor ;
22
23
import org .apache .ibatis .exceptions .TooManyResultsException ;
23
24
import org .apache .ibatis .session .RowBounds ;
24
25
@@ -901,6 +902,18 @@ public List<T> list() {
901
902
return baseMapper .selectByExample (example );
902
903
}
903
904
905
+ public List <T > page (int pageNum , int pageSize ) {
906
+ return baseMapper .selectByExample (example , new RowBounds ((pageNum - 1 ) * pageSize , pageSize ));
907
+ }
908
+
909
+ public List <T > offset (int offset , int limit ) {
910
+ return baseMapper .selectByExample (example , new RowBounds (offset , limit ));
911
+ }
912
+
913
+ public Cursor <T > cursor () {
914
+ return baseMapper .selectCursorByExample (example );
915
+ }
916
+
904
917
/**
905
918
* 根据当前查询条件查询,返回 Stream
906
919
*/
You can’t perform that action at this time.
0 commit comments