LambdaQueryWrapper.like()
时间: 2023-10-12 14:05:20 浏览: 99
LambdaQueryWrapper.like()是一个方法,用于在LambdaQueryWrapper对象中添加模糊查询条件。该方法接受三个参数,第一个参数是一个布尔值,用于判断是否应该添加该条件,第二个参数是一个字段的引用,表示要进行模糊查询的字段,第三个参数是要进行模糊查询的值。例如,lambdaQueryWrapper.like(StringUtils.isNotEmpty(houseHoldReq.getHouseholdNum()), HouseHold::getHouseholdNum, houseHoldReq.getHouseholdNum())表示如果houseHoldReq.getHouseholdNum()不为空,则在查询中添加对HouseHold表的householdNum字段进行模糊查询的条件。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [LambdaQueryWrapper构建查询条件](https://blog.csdn.net/weixin_42133138/article/details/126360147)[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* [lambdaQueryWrapper模糊查询like方法](https://blog.csdn.net/qq_44764295/article/details/126536601)[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 ]
阅读全文