File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
src/test/java/com/isea533/mybatis/test Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .isea533 .mybatis .test ;
2
+
3
+ import com .github .abel533 .sql .SqlMapper ;
4
+ import com .github .pagehelper .PageHelper ;
5
+ import com .github .pagehelper .PageInfo ;
6
+ import com .isea533 .mybatis .model .Country ;
7
+ import org .junit .Test ;
8
+ import org .springframework .beans .factory .annotation .Autowired ;
9
+
10
+ import java .util .List ;
11
+
12
+ /**
13
+ * Created by liuzh on 2015/3/7.
14
+ */
15
+ public class PageSqlMapperTest extends BasicTest {
16
+
17
+ @ Autowired
18
+ private SqlMapper sqlMapper ;
19
+
20
+ @ Test
21
+ public void test (){
22
+ PageHelper .startPage (2 ,10 );
23
+ List <Country > countries = sqlMapper .select ("select * from country" ,Country .class );
24
+ PageInfo <Country > pageInfo = new PageInfo <Country >(countries );
25
+ System .out .println (pageInfo .getTotal ());
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments