|
@@ -86,7 +86,10 @@
|
|
|
and ci.end_time_ < #{query.expiredTime} and ci.use_state_ = 'USABLE'
|
|
|
</when>
|
|
|
<when test="query.useState.code == 'USABLE'">
|
|
|
- and ci.end_time_ >= #{query.expiredTime} and ci.start_time_ <= #{query.expiredTime} and ci.use_state_ = 'USABLE'
|
|
|
+ and ci.end_time_ >= #{query.expiredTime} and ci.use_state_ = 'USABLE'
|
|
|
+ <if test="query.orderUse != null and query.orderUse == 1">
|
|
|
+ and ci.start_time_ <= #{query.expiredTime}
|
|
|
+ </if>
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
and ci.use_state_ = #{query.useState}
|
|
@@ -139,7 +142,7 @@
|
|
|
<if test="record.timestamp != null">
|
|
|
<choose>
|
|
|
<when test="record.userState.code == 'USABLE'">
|
|
|
- AND t1.start_time_ <= #{record.timestamp} AND #{record.timestamp} <= t1.end_time_ AND t1.use_state_ = 'USABLE'
|
|
|
+ AND #{record.timestamp} <= t1.end_time_ AND t1.use_state_ = 'USABLE'
|
|
|
</when>
|
|
|
<when test="record.userState.code == 'EXPIRED'">
|
|
|
AND #{record.timestamp} >= t1.end_time_ AND t1.use_state_ = 'USABLE'
|