ride-lease/ridelease-system/src/main/resources/mapper/system/RlOrderMapper.xml
18650502300 c50e3e4afb 车型
收费模式等
app首页统计
2024-10-10 08:50:13 +08:00

486 lines
28 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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.ruoyi.system.mapper.RlOrderMapper">
<resultMap type="RlOrderVO" id="RlOrderResult" autoMapping="true"/>
<sql id="selectRlOrderVo">
select order_id, order_no, out_trade_no, user_id, user_name, real_name, phone, rule_id, device_mac, sn, pay_time, pay_type, paid, type, total_fee, pay_fee, deposit, overdue_fee, dispatch_fee,delivery_fee,
lease_fee, mark, duration, status, create_time, return_time, deposit_deduction, deposit_order_no, deduction_amount, used_sn, change_reason,
auto_refund_deposit, rental_unit, handling_charge, platform_service_fee, operator_dividend, pay_channel, delivery_method, pickup_time,
agent_id, store_id, merchant_id, pickup_city, pickup_loc, pickup_lon, pickup_lat, model_id, model, expiry_time, original_order_no, num, price, `explain`,
instructions, out_unit, out_price,return_type,return_method,address,auto_cancel_time,cost, is_overdue from rl_order
</sql>
<sql id="selectRlOrderDetail">
SELECT
o.order_id,
o.order_no,
o.out_trade_no,
o.user_id,
o.user_name,
o.real_name,
o.phone,
o.rule_id,
o.device_mac,
o.sn,
o.pay_time,
o.pay_type,
o.paid,
o.type,
o.total_fee,
o.pay_fee,
o.deposit,
o.overdue_fee,
o.dispatch_fee,
o.delivery_fee,
o.lease_fee,
o.model_id,
o.model,
o.mark,
o.duration,
o.status,
o.create_time,
o.return_time,
o.deposit_deduction,
o.deposit_order_no,
o.deduction_amount,
o.used_sn,
o.change_reason,
o.auto_refund_deposit,
o.rental_unit,
o.handling_charge,
o.platform_service_fee,
o.operator_dividend,
o.pay_channel,
o.delivery_method,
o.pickup_time,
o.agent_id,
o.store_id,
o.pickup_city,
o.pickup_loc,
o.pickup_lon,
o.pickup_lat,
o.expiry_time,
o.original_order_no,
o.num,
o.price,
o.`explain`,
o.instructions,
o.out_unit,
o.out_price,
u.user_name as userName,
s.name as storeName,
s.simple_address as storeAddress,
m.model,
a.name agentName,
r.rental_unit as rentalUnit,
o.return_type,
o.return_method,
o.address,
o.auto_cancel_time,
o.merchant_id,
o.cost,
o.is_overdue,
CONCAT(
CASE
WHEN r.rental_unit = 'hours' THEN '时租'
WHEN r.rental_unit = 'day' THEN '日租'
WHEN r.rental_unit = 'week' THEN '周租'
WHEN r.rental_unit = 'month' THEN '月租'
WHEN r.rental_unit = 'quarter' THEN '季租'
WHEN r.rental_unit = 'year' THEN '年租'
ELSE r.rental_unit
END,
'', o.num, '',
CASE
WHEN r.rental_unit = 'hours' THEN '小时'
WHEN r.rental_unit = 'day' THEN '天'
WHEN r.rental_unit = 'week' THEN '周'
WHEN r.rental_unit = 'month' THEN '天'
WHEN r.rental_unit = 'quarter' THEN '天'
WHEN r.rental_unit = 'year' THEN '天'
ELSE ''
END, ''
) AS rentalPeriodText
FROM
rl_order o
left join rl_user u on o.user_id = u.user_id
left join rl_fee_rule r on o.rule_id = r.rule_id
left join rl_store s on o.store_id = s.store_id
left join rl_agent a on o.agent_id = a.agent_id
left join rl_model m on o.model_id = m.model_id
</sql>
<select id="selectRlOrderList" parameterType="RlOrderQuery" resultMap="RlOrderResult">
<include refid="selectRlOrderDetail"/>
<where>
<if test="orderNo != null and orderNo != ''"> and o.order_no like concat('%', #{orderNo}, '%')</if>
<if test="outTradeNo != null and outTradeNo != ''"> and o.out_trade_no like concat('%', #{outTradeNo}, '%')</if>
<if test="userId != null"> and o.user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and u.user_name like concat('%', #{userName}, '%')</if>
<if test="realName != null and realName != ''"> and o.real_name like concat('%', #{realName}, '%')</if>
<if test="phone != null and phone != ''"> and u.phonenumber like concat('%', #{phone}, '%')</if>
<if test="ruleId != null"> and o.rule_id = #{ruleId}</if>
<if test="deviceMac != null and deviceMac != ''"> and o.device_mac = #{deviceMac}</if>
<if test="sn != null and sn != ''"> and o.sn = #{sn}</if>
<if test="payTime != null"> and o.pay_time = #{payTime}</if>
<if test="payType != null and payType != ''"> and o.pay_type = #{payType}</if>
<if test="paid != null and paid != ''"> and o.paid = #{paid}</if>
<if test="type != null and type != ''"> and o.type = #{type}</if>
<if test="totalFee != null"> and o.total_fee = #{totalFee}</if>
<if test="payFee != null"> and o.pay_fee = #{payFee}</if>
<if test="deposit != null"> and o.deposit = #{deposit}</if>
<if test="dispatchFee != null"> and o.dispatch_fee = #{dispatchFee}</if>
<if test="deliveryFee != null"> and o.delivery_fee = #{deliveryFee}</if>
<if test="leaseFee != null"> and o.lease_fee = #{leaseFee}</if>
<if test="mark != null and mark != ''"> and o.mark = #{mark}</if>
<if test="duration != null"> and o.duration = #{duration}</if>
<if test="status != null and status != ''"> and o.status = #{status}</if>
<if test="returnTime != null"> and o.return_time = #{returnTime}</if>
<if test="depositDeduction != null and depositDeduction != ''"> and o.deposit_deduction = #{depositDeduction}</if>
<if test="deductionAmount != null"> and o.deduction_amount = #{deductionAmount}</if>
<if test="autoRefundDeposit != null"> and o.auto_refund_deposit = #{autoRefundDeposit}</if>
<if test="rentalUnit != null and rentalUnit != ''"> and o.rental_unit = #{rentalUnit}</if>
<if test="handlingCharge != null"> and o.handling_charge = #{handlingCharge}</if>
<if test="platformServiceFee != null"> and o.platform_service_fee = #{platformServiceFee}</if>
<if test="operatorDividend != null"> and o.operator_dividend = #{operatorDividend}</if>
<if test="payChannel != null"> and o.pay_channel = #{payChannel}</if>
<if test="deliveryMethod != null"> and o.delivery_method = #{deliveryMethod}</if>
<if test="pickupTime != null"> and o.pickup_time = #{pickupTime}</if>
<if test="agentId != null"> and o.agent_id = #{agentId}</if>
<if test="storeId != null"> and o.store_id = #{storeId}</if>
<if test="merchantId != null"> and o.merchant_id = #{merchantId}</if>
<if test="pickupCity != null and pickupCity != ''"> and o.pickup_city = #{pickupCity}</if>
<if test="pickupLoc != null and pickupLoc != ''"> and o.pickup_loc = #{pickupLoc}</if>
<if test="pickupLon != null and pickupLon != ''"> and o.pickup_lon = #{pickupLon}</if>
<if test="pickupLat != null and pickupLat != ''"> and o.pickup_lat = #{pickupLat}</if>
<if test="expiryTime != null"> and o.expiry_time = #{expiryTime}</if>
<if test="originalOrderNo != null and originalOrderNo != ''"> and o.original_order_no = #{originalOrderNo}</if>
<if test="startTime != null and startTime != ''"><!-- 开始时间检索 -->
and date_format(o.create_time,'%Y%m%d') &gt;= date_format(#{startTime},'%Y%m%d')
</if>
<if test="endTime != null and endTime != ''">
and date_format(o.create_time,'%Y%m%d') &lt;= date_format(#{endTime},'%Y%m%d')
</if>
<if test="keywords != null and keywords != ''">
AND (u.phonenumber LIKE CONCAT('%', #{keywords}, '%') OR o.order_no LIKE CONCAT('%', #{keywords}, '%'))
</if>
<if test="phone != null and phone != ''"> and u.phonenumber like concat('%', #{phone}, '%')</if>
<if test="statusList != null and statusList !=''">
AND o.status IN
<foreach item="item" index="index" collection="statusList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
order by o.create_time desc
</select>
<select id="selectAllRlOrderList" parameterType="RlOrderQuery" resultMap="RlOrderResult">
<include refid="selectRlOrderVo"/>
<where>
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
<if test="outTradeNo != null and outTradeNo != ''"> and out_trade_no = #{outTradeNo}</if>
<if test="userId != null"> and user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and u.user_name like concat('%', #{userName}, '%')</if>
<if test="realName != null and realName != ''"> and o.real_name like concat('%', #{realName}, '%')</if>
<if test="phone != null and phone != ''"> and u.phone like concat('%', #{phone}, '%')</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="paid != null and paid != ''"> and paid = #{paid}</if>
</where>
</select>
<select id="selectRlOrderByOrderId" parameterType="Long" resultMap="RlOrderResult">
<include refid="selectRlOrderDetail"/>
where o.order_id = #{orderId}
</select>
<select id="selectRlOrderByOrderNo" parameterType="String" resultMap="RlOrderResult">
<include refid="selectRlOrderDetail"/>
where o.order_no = #{orderNo}
</select>
<select id="selectRlOrderByOutTradeNo" resultType="com.ruoyi.system.domain.order.RlOrderVO">
<include refid="selectRlOrderDetail"/>
where o.out_trade_no = #{outTradeNo}
</select>
<select id="getInProgressOrder" resultType="com.ruoyi.system.domain.order.RlOrderVO">
<include refid="selectRlOrderDetail"/>
where o.sn = #{sn} and o.status = 4 and o.user_id = #{userId}
</select>
<insert id="insertRlOrder" parameterType="RlOrder" useGeneratedKeys="true" keyProperty="orderId">
insert into rl_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderNo != null and orderNo != ''">order_no,</if>
<if test="outTradeNo != null">out_trade_no,</if>
<if test="userId != null">user_id,</if>
<if test="userName != null and userName != ''">user_name,</if>
<if test="realName != null and realName != ''">real_name,</if>
<if test="phone != null and phone != ''">phone,</if>
<if test="ruleId != null">rule_id,</if>
<if test="deviceMac != null">device_mac,</if>
<if test="sn != null">sn,</if>
<if test="payTime != null">pay_time,</if>
<if test="payType != null">pay_type,</if>
<if test="paid != null and paid != ''">paid,</if>
<if test="type != null and type != ''">type,</if>
<if test="totalFee != null">total_fee,</if>
<if test="payFee != null">pay_fee,</if>
<if test="deposit != null">deposit,</if>
<if test="overdueFee != null">overdue_fee,</if>
<if test="dispatchFee != null">dispatch_fee,</if>
<if test="deliveryFee != null">delivery_fee,</if>
<if test="leaseFee != null">lease_fee,</if>
<if test="modelId != null">model_id,</if>
<if test="model != null">model,</if>
<if test="mark != null">mark,</if>
<if test="duration != null">duration,</if>
<if test="status != null">status,</if>
<if test="createTime != null">create_time,</if>
<if test="returnTime != null">return_time,</if>
<if test="depositDeduction != null">deposit_deduction,</if>
<if test="depositOrderNo != null">deposit_order_no,</if>
<if test="deductionAmount != null">deduction_amount,</if>
<if test="usedSn != null">used_sn,</if>
<if test="changeReason != null">change_reason,</if>
<if test="autoRefundDeposit != null">auto_refund_deposit,</if>
<if test="rentalUnit != null">rental_unit,</if>
<if test="handlingCharge != null">handling_charge,</if>
<if test="platformServiceFee != null">platform_service_fee,</if>
<if test="operatorDividend != null">operator_dividend,</if>
<if test="payChannel != null">pay_channel,</if>
<if test="deliveryMethod != null">delivery_method,</if>
<if test="pickupTime != null">pickup_time,</if>
<if test="agentId != null">agent_id,</if>
<if test="storeId != null">store_id,</if>
<if test="merchantId != null">merchant_id,</if>
<if test="pickupCity != null">pickup_city,</if>
<if test="pickupLoc != null">pickup_loc,</if>
<if test="pickupLon != null">pickup_lon,</if>
<if test="pickupLat != null">pickup_lat,</if>
<if test="expiryTime != null">expiry_time,</if>
<if test="originalOrderNo != null">original_order_no,</if>
<if test="num != null">num,</if>
<if test="price != null">price,</if>
<if test="explain != null">`explain`,</if>
<if test="instructions != null">instructions,</if>
<if test="outUnit != null">out_unit,</if>
<if test="outPrice != null">out_price,</if>
<if test="returnType != null">return_type,</if>
<if test="returnMethod != null">return_method,</if>
<if test="address != null">address,</if>
<if test="autoCancelTime != null">auto_cancel_time,</if>
<if test="cost != null">cost,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
<if test="outTradeNo != null">#{outTradeNo},</if>
<if test="userId != null">#{userId},</if>
<if test="userName != null and userName != ''">#{userName},</if>
<if test="realName != null and realName != ''">#{realName},</if>
<if test="phone != null and phone != ''">#{phone},</if>
<if test="ruleId != null">#{ruleId},</if>
<if test="deviceMac != null">#{deviceMac},</if>
<if test="sn != null">#{sn},</if>
<if test="payTime != null">#{payTime},</if>
<if test="payType != null">#{payType},</if>
<if test="paid != null and paid != ''">#{paid},</if>
<if test="type != null and type != ''">#{type},</if>
<if test="totalFee != null">#{totalFee},</if>
<if test="payFee != null">#{payFee},</if>
<if test="deposit != null">#{deposit},</if>
<if test="overdueFee != null">#{overdueFee},</if>
<if test="dispatchFee != null">#{dispatchFee},</if>
<if test="deliveryFee != null">#{deliveryFee},</if>
<if test="leaseFee != null">#{leaseFee},</if>
<if test="modelId != null">#{modelId},</if>
<if test="model != null">#{model},</if>
<if test="mark != null">#{mark},</if>
<if test="duration != null">#{duration},</if>
<if test="status != null">#{status},</if>
<if test="createTime != null">#{createTime},</if>
<if test="returnTime != null">#{returnTime},</if>
<if test="depositDeduction != null">#{depositDeduction},</if>
<if test="depositOrderNo != null">#{depositOrderNo},</if>
<if test="deductionAmount != null">#{deductionAmount},</if>
<if test="usedSn != null">#{usedSn},</if>
<if test="changeReason != null">#{changeReason},</if>
<if test="autoRefundDeposit != null">#{autoRefundDeposit},</if>
<if test="rentalUnit != null">#{rentalUnit},</if>
<if test="handlingCharge != null">#{handlingCharge},</if>
<if test="platformServiceFee != null">#{platformServiceFee},</if>
<if test="operatorDividend != null">#{operatorDividend},</if>
<if test="payChannel != null">#{payChannel},</if>
<if test="deliveryMethod != null">#{deliveryMethod},</if>
<if test="pickupTime != null">#{pickupTime},</if>
<if test="agentId != null">#{agentId},</if>
<if test="storeId != null">#{storeId},</if>
<if test="merchantId != null">#{merchantId},</if>
<if test="pickupCity != null">#{pickupCity},</if>
<if test="pickupLoc != null">#{pickupLoc},</if>
<if test="pickupLon != null">#{pickupLon},</if>
<if test="pickupLat != null">#{pickupLat},</if>
<if test="expiryTime != null">#{expiryTime},</if>
<if test="originalOrderNo != null">#{originalOrderNo},</if>
<if test="num != null">#{num},</if>
<if test="price != null">#{price},</if>
<if test="explain != null">#{explain},</if>
<if test="instructions != null">#{instructions},</if>
<if test="outUnit != null">#{outUnit},</if>
<if test="outPrice != null">#{outPrice},</if>
<if test="returnType != null">#{returnType},</if>
<if test="returnMethod != null">#{returnMethod},</if>
<if test="address != null">#{address},</if>
<if test="autoCancelTime != null">#{autoCancelTime},</if>
<if test="cost != null">#{cost},</if>
</trim>
</insert>
<update id="updateRlOrder" parameterType="RlOrder">
update rl_order
<trim prefix="SET" suffixOverrides=",">
<if test="orderNo != null and orderNo != ''">order_no = #{orderNo},</if>
<if test="outTradeNo != null">out_trade_no = #{outTradeNo},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="realName != null and realName != ''">real_name = #{realName},</if>
<if test="phone != null and phone != ''">phone = #{phone},</if>
<if test="ruleId != null">rule_id = #{ruleId},</if>
<if test="deviceMac != null">device_mac = #{deviceMac},</if>
<if test="sn != null">sn = #{sn},</if>
<if test="payTime != null">pay_time = #{payTime},</if>
<if test="payType != null">pay_type = #{payType},</if>
<if test="paid != null and paid != ''">paid = #{paid},</if>
<if test="type != null and type != ''">type = #{type},</if>
<if test="totalFee != null">total_fee = #{totalFee},</if>
<if test="payFee != null">pay_fee = #{payFee},</if>
<if test="deposit != null">deposit = #{deposit},</if>
<if test="overdueFee != null">overdue_fee = #{overdueFee},</if>
<if test="dispatchFee != null">dispatch_fee = #{dispatchFee},</if>
<if test="deliveryFee != null">delivery_fee = #{deliveryFee},</if>
<if test="leaseFee != null">lease_fee = #{leaseFee},</if>
<if test="modelId != null">model_id = #{modelId},</if>
<if test="model != null">model = #{model},</if>
<if test="mark != null">mark = #{mark},</if>
<if test="duration != null">duration = #{duration},</if>
<if test="status != null">status = #{status},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="returnTime != null">return_time = #{returnTime},</if>
<if test="depositDeduction != null">deposit_deduction = #{depositDeduction},</if>
<if test="depositOrderNo != null">deposit_order_no = #{depositOrderNo},</if>
<if test="deductionAmount != null">deduction_amount = #{deductionAmount},</if>
<if test="usedSn != null">used_sn = #{usedSn},</if>
<if test="changeReason != null">change_reason = #{changeReason},</if>
<if test="autoRefundDeposit != null">auto_refund_deposit = #{autoRefundDeposit},</if>
<if test="rentalUnit != null">rental_unit = #{rentalUnit},</if>
<if test="handlingCharge != null">handling_charge = #{handlingCharge},</if>
<if test="platformServiceFee != null">platform_service_fee = #{platformServiceFee},</if>
<if test="operatorDividend != null">operator_dividend = #{operatorDividend},</if>
<if test="payChannel != null">pay_channel = #{payChannel},</if>
<if test="deliveryMethod != null">delivery_method = #{deliveryMethod},</if>
<if test="pickupTime != null">pickup_time = #{pickupTime},</if>
<if test="agentId != null">agent_id = #{agentId},</if>
<if test="storeId != null">store_id = #{storeId},</if>
<if test="merchantId != null">merchant_id = #{merchantId},</if>
<if test="pickupCity != null">pickup_city = #{pickupCity},</if>
<if test="pickupLoc != null">pickup_loc = #{pickupLoc},</if>
<if test="pickupLon != null">pickup_lon = #{pickupLon},</if>
<if test="pickupLat != null">pickup_lat = #{pickupLat},</if>
<if test="expiryTime != null">expiry_time = #{expiryTime},</if>
<if test="originalOrderNo != null">original_order_no = #{originalOrderNo},</if>
<if test="num != null">num = #{num},</if>
<if test="price != null">price = #{price},</if>
<if test="explain != null">`explain` = #{explain},</if>
<if test="instructions != null">instructions = #{instructions},</if>
<if test="outUnit != null">out_unit = #{outUnit},</if>
<if test="outPrice != null">out_price = #{outPrice},</if>
<if test="returnType != null">return_type = #{returnType},</if>
<if test="returnMethod != null">return_method = #{returnMethod},</if>
<if test="address != null">address = #{address},</if>
<if test="autoCancelTime != null">auto_cancel_time = #{autoCancelTime},</if>
<if test="isOverdue != null">is_overdue = #{isOverdue},</if>
<if test="cost != null">cost = #{cost},</if>
</trim>
where order_id = #{orderId}
</update>
<update id="updateRlOrderByOrderNo" parameterType="RlOrder">
update rl_order
<trim prefix="SET" suffixOverrides=",">
<if test="orderNo != null and orderNo != ''">order_no = #{orderNo},</if>
<if test="outTradeNo != null">out_trade_no = #{outTradeNo},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="realName != null and realName != ''">real_name = #{realName},</if>
<if test="phone != null and phone != ''">phone = #{phone},</if>
<if test="ruleId != null">rule_id = #{ruleId},</if>
<if test="deviceMac != null">device_mac = #{deviceMac},</if>
<if test="sn != null">sn = #{sn},</if>
<if test="payTime != null">pay_time = #{payTime},</if>
<if test="payType != null">pay_type = #{payType},</if>
<if test="paid != null and paid != ''">paid = #{paid},</if>
<if test="type != null and type != ''">type = #{type},</if>
<if test="totalFee != null">total_fee = #{totalFee},</if>
<if test="payFee != null">pay_fee = #{payFee},</if>
<if test="deposit != null">deposit = #{deposit},</if>
<if test="overdueFee != null">overdue_fee = #{overdueFee},</if>
<if test="dispatchFee != null">dispatch_fee = #{dispatchFee},</if>
<if test="deliveryFee != null">delivery_fee = #{deliveryFee},</if>
<if test="leaseFee != null">lease_fee = #{leaseFee},</if>
<if test="modelId != null">model_id = #{modelId},</if>
<if test="model != null">model,</if>
<if test="mark != null">mark = #{mark},</if>
<if test="duration != null">duration = #{duration},</if>
<if test="status != null">status = #{status},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="returnTime != null">return_time = #{returnTime},</if>
<if test="depositDeduction != null">deposit_deduction = #{depositDeduction},</if>
<if test="depositOrderNo != null">deposit_order_no = #{depositOrderNo},</if>
<if test="deductionAmount != null">deduction_amount = #{deductionAmount},</if>
<if test="usedSn != null">used_sn = #{usedSn},</if>
<if test="changeReason != null">change_reason = #{changeReason},</if>
<if test="autoRefundDeposit != null">auto_refund_deposit = #{autoRefundDeposit},</if>
<if test="rentalUnit != null">rental_unit = #{rentalUnit},</if>
<if test="handlingCharge != null">handling_charge = #{handlingCharge},</if>
<if test="platformServiceFee != null">platform_service_fee = #{platformServiceFee},</if>
<if test="operatorDividend != null">operator_dividend = #{operatorDividend},</if>
<if test="payChannel != null">pay_channel = #{payChannel},</if>
<if test="deliveryMethod != null">delivery_method = #{deliveryMethod},</if>
<if test="pickupTime != null">pickup_time = #{pickupTime},</if>
<if test="agentId != null">agent_id = #{agentId},</if>
<if test="storeId != null">store_id = #{storeId},</if>
<if test="merchantId != null">merchant_id = #{merchantId},</if>
<if test="pickupCity != null">pickup_city = #{pickupCity},</if>
<if test="pickupLoc != null">pickup_loc = #{pickupLoc},</if>
<if test="pickupLon != null">pickup_lon = #{pickupLon},</if>
<if test="pickupLat != null">pickup_lat = #{pickupLat},</if>
<if test="expiryTime != null">expiry_time = #{expiryTime},</if>
<if test="originalOrderNo != null">original_order_no = #{originalOrderNo},</if>
<if test="num != null">num = #{num},</if>
<if test="price != null">price = #{price},</if>
<if test="explain != null">`explain` = #{explain},</if>
<if test="instructions != null">instructions = #{instructions},</if>
<if test="outUnit != null">out_unit = #{outUnit},</if>
<if test="outPrice != null">out_price = #{outPrice},</if>
<if test="returnType != null">return_type = #{returnType},</if>
<if test="cost != null">cost = #{cost},</if>
</trim>
where order_no = #{orderNo}
</update>
<delete id="deleteRlOrderByOrderId" parameterType="Long">
delete from rl_order where order_id = #{orderId}
</delete>
<delete id="deleteRlOrderByOrderIds" parameterType="String">
delete from rl_order where order_id in
<foreach item="orderId" collection="array" open="(" separator="," close=")">
#{orderId}
</foreach>
</delete>
</mapper>