mybatisplus like查询
时间: 2023-09-18 22:07:27 浏览: 99
MybatisPlus中的条件构造器可以用于实现like查询。这个功能可以通过自定义拦截器来实现。拦截器会将serviceImpl层传入的全角模糊查询转换成对应的SQL语句。其中,QueryWrapper的like方法支持全角模糊查询(%%),mapper或xml层的全角模糊查询(%*%)和半角模糊查询(%*或*%)。通过使用条件构造器的eq方法,可以实现等于操作,即=。 <span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Mybatis自定义拦截器,对模糊查询传值的特殊字符统一进行转义处理的代码](https://download.csdn.net/download/qq_25824243/12723137)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [MybatisPlus条件查询方法全解](https://blog.csdn.net/weixin_45529338/article/details/130448579)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [MyBatis-Plus查询方法](https://blog.csdn.net/qwredqwr/article/details/104747960)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文