mybatis 模糊查询,与时间段查询

自动增加where条件,并消除if中前面多余的and或or

  xxx
  and xxx
  or xxx


等同于

  xxx
  and xxx
  or xxx

模糊查询:

like CONCAT(CONCAT('%',#{titleName}),'%')

时间段:

select * from table where date between date1 and date2;


你可能感兴趣的:(数据库)