In mysql, there needs to be a lot of time time to time the query conditions, between ... and ... for most of this situation.
The following query time of writing:
<select id="timeSelect" resultMap="BaseResultMap">
SELECT COUNT(*) FROM 表名
<where>
ActionTime between #{startTime} and #{endTime}
</where>
</select>
explain:
ActionTime between # {startTime} and # {endTime}
is equivalent to:
ActionTime> = ActionTime and the startTime <= endTime
such a means is very simple.