mybatis-plus的LambdaQueryWrapper中and、or的用法
·
// WHERE xxxx!=id And ( xxxx=ANo or xxxx=BNo)
LambdaQueryWrapper<Student> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.ne(Student::getId,sysstudents.getId());
queryWrapper.and((wrapper)->{
wrapper.eq(Student::getANo,sysstudents.getBillNo())
.or().eq(Student::getBNo,sysstudents.getBillNo());
});
更多推荐
已为社区贡献1条内容
所有评论(0)