订单使用状态bug

This commit is contained in:
磷叶 2024-09-09 21:56:25 +08:00
parent 90b730c2f8
commit eda9715196

View File

@ -100,20 +100,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join ss_channel_withdraw sc on sc.channel_id = stb.channel_id
</sql>
<!-- (-->
<!-- (-->
<!-- and stb.suit_start_time is not null-->
<!-- and stb.suit_start_time &lt; now()-->
<!-- and (stb.suit_end_time is null or stb.suit_end_time > now())-->
<!-- ) or (-->
<!-- stb.suit_fee_type in ('2', '3')-->
<!-- and stb.suit_start_ele is not null-->
<!-- and stb.suit_start_ele &lt; sd.total_electri_quantity-->
<!-- and (stb.suit_end_ele is null or stb.suit_end_ele > sd.total_electri_quantity)-->
<!-- )-->
<!-- )-->
<sql id="isUsing">
(
(
stb.suit_start_time is not null
and stb.suit_start_time &lt; now()
and (stb.suit_end_time is null or stb.suit_end_time > now())
!(
stb.suit_start_time is null or stb.suit_start_time > now()
or (
stb.suit_fee_type in ('2', '3')
and (stb.suit_start_ele is null or stb.suit_start_ele > sd.total_electri_quantity)
)
or
(
stb.suit_fee_type in ('2', '3')
and stb.suit_start_ele is not null
and stb.suit_start_ele &lt; sd.total_electri_quantity
and (stb.suit_end_ele is null or stb.suit_end_ele > sd.total_electri_quantity)
)
) and !(<include refid="isFinished"/>)
)
</sql>
@ -122,9 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(
(
stb.suit_end_time is not null and stb.suit_end_time &lt;= now()
)
or
(
) or (
stb.suit_fee_type in ('2', '3')
and (stb.suit_end_ele is not null and stb.suit_end_ele &lt;= sd.total_electri_quantity)
)