2025-07-11 08:56:56 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.aircraft.modules.order.mapper.OrderMainMapper">
|
|
|
|
|
2025-07-21 00:11:19 +08:00
|
|
|
<!-- 通用查询结果列 -->
|
|
|
|
<sql id="BaseColumn">
|
|
|
|
id, order_no, order_type, order_initiator_id, phone, attraction_id, customer_id,
|
2025-07-26 11:42:54 +08:00
|
|
|
customer_name, route_ids, cargo_weight, total_amount, amount, surcharge_amount, open_id,
|
2025-07-21 00:11:19 +08:00
|
|
|
settlement_status, main_order_status, relevance_status, order_create_time,
|
|
|
|
order_finish_time, create_time, create_by, update_time, update_by, del_flag
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="obtainOrderList" resultType="com.aircraft.modules.order.domain.OrderMain">
|
|
|
|
select
|
|
|
|
<include refid="BaseColumn"/>
|
|
|
|
from fms_od_order_main
|
|
|
|
where del_flag = 0
|
|
|
|
<if test="orderInitiatorId != null">
|
|
|
|
and id in (
|
|
|
|
select order_id from fms_od_order_operator where operator_id = #{orderInitiatorId}
|
|
|
|
)
|
|
|
|
</if>
|
|
|
|
<if test="phone != null and phone != ''">
|
|
|
|
and phone = #{phone}
|
|
|
|
</if>
|
|
|
|
<if test="customerId != null">
|
|
|
|
and customer_id = #{customerId}
|
|
|
|
</if>
|
|
|
|
<if test="attractionId != null">
|
|
|
|
and attraction_id = #{attractionId}
|
|
|
|
</if>
|
2025-07-31 00:26:11 +08:00
|
|
|
<if test="mainOrderStatusList != null and mainOrderStatusList.size() > 0">
|
|
|
|
and main_order_status in
|
|
|
|
<foreach item="item" collection="mainOrderStatusList" open="(" separator="," close=")">
|
|
|
|
#{item}
|
|
|
|
</foreach>
|
|
|
|
</if>
|
2025-07-26 15:53:46 +08:00
|
|
|
order by id desc
|
2025-07-21 00:11:19 +08:00
|
|
|
</select>
|
2025-07-11 08:56:56 +08:00
|
|
|
</mapper>
|