模糊查询xml
<select id="selectAll" resultMap="BaseResultMap" parameterType="java.lang.String">
<!-- select *
from t_upgrade_log where uuid like concat('%',#{searchfilters},'%') -->
SELECT * from t_upgrade_log where 1=1
<if test="arg0 !=null and arg0 !='' ">
and uuid like CONCAT(CONCAT('%', #{arg0}),'%')
</if>
<if test="arg1 != '' and arg1 != null">
and download_time between #{arg1} and #{arg3}
</if>
<if test="arg2 != '' and arg2 != null">
and download_time between '2018-05-20-00-00-00' and #{arg2}
</if>
<if test="arg1 != '' and arg1 != null and arg2 != '' and arg2 != null">
and download_time between #{arg1} and #{arg2}
</if>
</select>