实现baomidou的mybatisplus实现OR操作符关键词进行两个不同条件SQL的代码示例,sql示例说明
select * from xb_user u where u.user_account='test' or u.user_name='test'
代码示例如下
pageData = userService.page(new Page<XbUser>(condition.getPageNumber(), condition.getPageSize()),@b@ Wrappers.<XbUser>lambdaQuery()@b@ .eq(XbUser::getUserAccount,condition.getCondition().getUserAccount())@b@ .or(w->w.eq(XbUser::getUserName,condition.getCondition().getUserName())));