LambdaQueryWrapper notin
时间: 2023-08-13 08:08:22 浏览: 396
LambdaQueryWrapper is a class provided by the CSDN development team for constructing complex query conditions in the database. It is commonly used in conjunction with the MyBatis framework.
The "notin" function is used to specify that a column's value should not be present in a given list. It is typically used in a query condition to exclude certain values from the result set.
Here's an example of how you can use the "notin" function with LambdaQueryWrapper:
```java
LambdaQueryWrapper<User> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.notIn(User::getId, Arrays.asList(1, 2, 3));
List<User> userList = userDao.selectList(queryWrapper);
```
In this example, we create a LambdaQueryWrapper object and specify that the "id" column should not be in the list [1, 2, 3]. We then use this query wrapper to retrieve a list of users from the database.
Please note that the specific syntax and usage may vary depending on the database and ORM framework you're using.