<choose>
<when test="strategyBeginTime != null and strategyEndTime==null">
and #{strategyBeginTime,jdbcType=TIMESTAMP} <= s.end_time
</when>
<when test="strategyEndTime != null and strategyBeginTime == null">
and #{strategyEndTime,jdbcType=TIMESTAMP} >= s.begin_time
</when>
<when test="strategyEndTime != null and strategyBeginTime != null">
and ((s.begin_time <=#{strategyBeginTime} and s.end_time >#{strategyBeginTime}) or (s.begin_time >=#{strategyBeginTime} and s.begin_time<=#{strategyEndTime}))
</when>
</choose>