mybatis的日期查询与字段的模糊查询例子

查询两个日期之前的日期内容的where语句
<if test="w.start != null and w.start != ''">AND checktime ]]> #{w.start}if>
<if test="w.end != null and w.end != ''">AND checktime #{w.end}if>

查询某个字段的模糊查询
<if test="w.titles != null and w.titles !=''">and title LIKE  CONCAT(CONCAT('%', #{w.titles}), '%') if>

你可能感兴趣的:(mybatis的日期查询与字段的模糊查询例子)