增加租电订单查询

This commit is contained in:
2025-08-24 12:24:12 +08:00
parent d23f504095
commit b4dce9f195
8 changed files with 139 additions and 1 deletions

View File

@ -59,4 +59,48 @@
</select>
<select id="pageQueryRentBatteyOrder" resultType="com.sczx.order.dto.RentBatteySplOrderDTO">
select
zos.b_order_id AS zd_order_id,
zos.suborder_no,
zom.order_status,
zrbr.icon,
zrbr.voltage,
zrbr.ah,
zbc.category_name,
zom.first_order_time,
zom.end_rent_time
from
zc_order_sub zos
left join zc_order_main zom on
zos.order_id = zom.order_id
left join zc_rent_battey_rule zrbr on
zom.rent_battey_rule_id = zrbr.id
left join zc_battery_category zbc on
zrbr.category_id = zbc.id
<where>
zos.del_flag = '0'
and zom.del_flag = '0'
<if test="customerId != null">
and zom.customer_id = #{customerId}
</if>
<if test="storeId != null">
and zom.store_id = #{storeId}
</if>
<if test="orderStatusList != null and orderStatusList.size() > 0">
and zom.order_status in
<foreach collection="orderStatusList" item="orderStatus" open="(" separator="," close=")">
#{orderStatus}
</foreach>
</if>
<if test="queryBrandName != null and queryBrandName != ''">
and zrbr.category_name like concat('%', #{queryBrandName}, '%')
</if>
</where>
order by zos.create_time desc
</select>
</mapper>