1、从前台传递一个String类型的参数到后台进行查询,如果牵涉到模糊查询会报错,应该把参数封装到对象中再进行传递然后进行模糊查询

2、一个查询框,多个查询条件

关于mybatis中sql映射文件模糊查询的使用

<if test="customer !=null and customer !=''">
  and t.customer_name like '%#{customer}%' or t.contact_information like '%#{customer}%'
</if>

相关文章:

  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
  • 2021-06-04
  • 2021-10-21
  • 2021-10-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2021-11-29
  • 2021-10-25
  • 2021-09-03
相关资源
相似解决方案