1.第一种写的是数据库表的字段
QueryWrapper<User> wrapper = new QueryWrapper<>(); wrapper.select("id","name").like("name","张三").lt("age",40); return userMapper.selectList(wrapper);
2.第二种对应的实体
//查询所有用户 LambdaQueryWrapper<PhotoUser> wrapperUser = Wrappers.lambdaQuery(); wrapperUser.select(PhotoUser::getNickname,PhotoUser::getAppellation).or().in(PhotoUser::getId,userIdList); List<PhotoUser> photoUsers = userService.list(wrapperUser);