QueryWrapper中or的使用
queryWrapper.and(wrapper -> {
// 拼接sql
wrapper
.like("user_name", name)
.or()
.like("user_admin_name",name);
});
where (user_id='1' and (user_name like '%111%' or user_admin_name like '%222%'))
queryWrapper.and(wrapper -> {
// 拼接sql
wrapper
.like("user_name", name)
.or()
.like("user_admin_name",name);
});
where (user_id='1' and (user_name like '%111%' or user_admin_name like '%222%'))