2022年2月

mybatis 时间搜索和模糊搜索

<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
    AND oper_time <![CDATA[  >=  ]]>  #{params.beginTime}
</if>

<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
    AND oper_time <![CDATA[  <=  ]]>  #{params.endTime}
</if>

<if test="operName != null and operName != ''">
       and sys_dept.dept_name like   '%' || #{deptName} || '%'
</if>

mybatis-plus 时间搜索和模糊搜索