@Test
public void squery() {
//创建QueryWrapper 对象
QueryWrapper<User> queryWrapper = new QueryWrapper<>();
//ge gt le lt: 大于等于 大于 小于等于 小于
queryWrapper.ge("age",29);
List<User> users = userMapper.selectList(queryWrapper);
System.out.println(users);
//eq ne 等于 不等于
//between 介于查询
queryWrapper.between("age",28,30);
List<User> users1 = userMapper.selectList(queryWrapper);
System.out.println(users1);
//模糊查询
queryWrapper.like("nam","l");
queryWrapper.select("id","nam");
List<User> users2 = userMapper.selectList(queryWrapper);
System.out.println(users2);
// orderByDesc 降序查找
queryWrapper.orderByDesc;
//last 在sql语句后面拼接
queryWrapper.last("limit 1");
}