mybatis between and写法
<choose>
<when test="startDate != null and endDate != null">
and CR_DATE between #{startDate} and #{endDate}
</when>
<when test="startDate != null and endDate == null">
and CR_DATE >= #{startDate}
</when>
<when test="startDate == null and endDate != null">
and CR_DATE <= #{endDate}
</when>
<otherwise>
and 1=1
</otherwise>
</choose>