XML Fuzzy query CONCAT ()

1. fuzzy query 

<if test="filename != null  and filename != '' "> and filename like CONCAT('%',#{filename},'%')</if>

2. The time of the query

Greater than>
<If test = "! Params.beginTime = null and params.beginTime = ''!"> <-! Start time search ->
   AND date_format(u.create_time,'%Y-%m-%d') &gt;= date_format(#{params.beginTime},'%Y-%m-%d')
</if>


Less than <
<If test = "! Params.beginTime = null and params.beginTime = ''!"> <-! End time search ->
   AND date_format(u.create_time,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{params.beginTime},'%Y-%m-%d %H:%i:%s')</if>
Published 32 original articles · won praise 6 · views 6862

Guess you like

Origin blog.csdn.net/qq_42307369/article/details/102502998