//多条件查询 and条件 和 or条件 @Test public void test_01(){QueryWrapper<User> queryWrapper = new QueryWrapper<>();queryWrapper.like("name","a").between("age",20,30).or().isNotNull("email");List<User> users = userMapper.selectList(queryWrapper); }//排序 降序和升序 @Test public void test2(){QueryWrapper<User> queryWrapper = new QueryWrapper<>();queryWrapper.orderByDesc("age").orderByAsc("id");List<User> users = userMapper.selectList(queryWrapper); }//查询指定列 指定查询name列和age列 public void test5(){QueryWrapper<User> queryWrapper = new QueryWrapper<>();queryWrapper.select("name","age");List<User> users = userMapper.selectList(queryWrapper); }//带条件判断 @Test public void test6(){String name="xx";Integer age = 19;QueryWrapper<User> queryWrapper = new QueryWrapper<>();queryWrapper.eq(StringUtils.isNotBlank(name),"name",name);queryWrapper.eq(age!=null && age>18,"age",age);List<User> users = userMapper.selectList(queryWrapper); }