String comparison size in mybaits

For example: if the start time and end time are both varchar types, then you can use the following method to get the time range

<if test="startTime != null">
    <![CDATA[ and o.STARTTIME >= #{startTime}]]>
</if>
<if test="endTime != null">
    <![CDATA[ and o.ENDTIME <= #{endTime}]]>
</if>

 

Guess you like

Origin blog.csdn.net/qq_36138652/article/details/107655211