实现效果
SELECT id,name,status
FROM uc_user
WHERE ((name LIKE '%三%' OR status LIKE '%三%') AND password = '1')
LIMIT 0,10;
示例
public Page<User> selectUserPageVoByCondition(Integer pageNumber, Integer pageSize, String params,String password) {
return this.userMapper.selectPage(new Page<>(pageNumber, pageSize), new QueryWrapper<User>().select("id,name,status")
.lambda()
.and(StringUtils.isNotEmpty(params), wrapper -> wrapper.like(User::getName, params)
.or()
.like(User::getStatus, params)
)
.eq(User::getPassword,password)
);
}