We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PageHelper.startPage(1, 10); List<User> list; if(param1 != null){ list = userMapper.selectIf(param1); } else { list = new ArrayList<User>(); }
不安全的分页是因为调用了静态方法,能否新增一个注解例如@StartPage使其定义在mapper的方法上
@StartPage
@StartPage @Select("select * from user") PageInfo<User> selectByStartPage(PageInfo pageinfo);
调用方法类似于
PageInfo<User> users; if(param1 != null){ users = userMapper.selectByStartPage(new PageInfo(@Param("pageNum") pageNum, @Param("pageSize") pageSize)); } else { users = new PageInfo<User>(); }
The text was updated successfully, but these errors were encountered:
支持方法参数查询,这种方式更安全,不需要加注解。
Sorry, something went wrong.
No branches or pull requests
功能建议
不安全的分页是因为调用了静态方法,能否新增一个注解例如
@StartPage
使其定义在mapper的方法上调用方法类似于
The text was updated successfully, but these errors were encountered: