mybatispluswapper书写
时间: 2023-09-25 14:11:02 浏览: 97
MyBatis Plus is an extension library for the MyBatis framework which provides additional features and utilities to simplify database operations. The `.eq` method in MyBatis Plus is used for creating an equality condition in SQL queries.
For example, if you have a table called `users` with columns `id`, `name`, and `age`, and you want to query for users with a specific name, you can use the `.eq` method like this:
```java
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
QueryWrapper<User> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("name", "John Doe");
List<User> userList = userMapper.selectList(queryWrapper);
```
In the above code, the `.eq("name", "John Doe")` condition will generate a SQL query like `SEL
阅读全文
相关推荐






