use of com.maxqiu.demo.model.ParamSome in project demo-SpringBoot by Max-Qiu.
the class TestPage method testMyPage.
/**
* 自定义 page 对象
*/
@Test
void testMyPage() {
// SELECT COUNT(*) FROM smp_user WHERE (age = ? AND username = ?) OR (age = ? AND username = ?)
// select * from smp_user where (age = ? and username = ?) or (age = ? and username = ?) LIMIT ?
MyPage<User> myPage = new MyPage<>(1, 5);
myPage.setSelectInt(20);
myPage.setSelectStr("Jack");
ParamSome paramSome = new ParamSome(20, "Jack");
MyPage<User> userMyPage = userMapper.mySelectPage(myPage, paramSome);
System.out.println(userMyPage.getTotal());
}
Aggregations