String fuzzy query
<if test="userName != null and userName!= ''">
AND `user_name` LIKE CONCAT(CONCAT('%', #{userName}), '%')
</if>
Date and time range query
<if test="dto.metaCreatedStart != null">
AND `meta_created` >= #{dto.metaCreatedStart}
</if>
<if test="dto.metaCreatedEnd != null">
AND `meta_created` <= #{dto.metaCreatedEnd}
</if>
Collection range query
<if test="frameIds != null and frameIds.size> 0">
AND `frame_id ` IN (<foreach collection="frameIds" item="frameId" separator=","> #{frameId} </foreach>)
</if>
Boolean query
<if test="isNew != null and isNew == true">
AND `type` < 5
</if>