LambdaQueryWrapper.gt方法
时间: 2023-10-12 11:05:19 浏览: 140
LambdaQueryWrapper.gt方法是LambdaQueryWrapper类中的一个方法,用于设置一个大于的条件。该方法的使用方式是调用gt(fieldName, value)方法,其中fieldName表示字段名,value表示要比较的值。例如,在LambdaQueryWrapper中使用gt方法可以实现age大于20的条件查询,代码示例如下:
```
LambdaQueryWrapper<User> wrapper = Wrappers.lambdaQuery();
wrapper.gt(User::getAge, 20);
List<User> userList = this.baseMapper.selectList(wrapper);
```<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [LambdaQueryWrapper&QueryWrapper增删改CURD使用教程案例](https://blog.csdn.net/m0_59252007/article/details/121267361)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Mybatis-Plus高级查询LambdaQueryWrapper&QueryWrapper](https://blog.csdn.net/weixin_52317961/article/details/128317591)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文