参数形式
sql
<if test="params.beginOrderDate != null and params.beginOrderDate != ''">
<!-- 开始时间检索 -->
AND DATEDIFF(day,#{params.beginOrderDate},b.order_date) >= 0
</if>
<if test="params.endOrderDate != null and params.endOrderDate != ''">
<!-- 结束时间检索 -->
AND DATEDIFF(day,#{params.endOrderDate},b.order_date) <= 0
</if>