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

来源:互联网 发布:考驾证下载什么软件 编辑:程序博客网 时间:2024/06/06 00:19
查询两个日期之前的日期内容的where语句
<if test="w.start != null and w.start != ''">AND checktime <![CDATA[>]]> #{w.start}</if><if test="w.end != null and w.end != ''">AND checktime <![CDATA[<]]>#{w.end}</if>

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

原创粉丝点击