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%'))
posted @ 2023-04-25 11:04  wandoubaguo  阅读(1565)  评论(0编辑  收藏  举报