xuhy
2024-09-06 f2dff53d76a7e9a23e6a2ecfed58ce978dc41442
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml
@@ -195,44 +195,59 @@
    </select>
    <select id="getRefundList" resultType="com.ruoyi.order.api.model.TChargingOrderRefund">
        select * from (SELECT id,
                              `code`,
                              refund_code,
                              refund_title,
                              refund_reason,
                              refund_amount,
                              refund_total_amount,
                              refund_time,
                              pay_type,
                              pay_amount,
                              refund_remark
                       FROM t_charging_order_refund
                       UNION ALL
                       SELECT id,
                              `code`,
                              refund_code,
                              refund_title,
                              refund_reason,
                              refund_amount,
                              refund_total_amount,
                              refund_time,
                              pay_type,
                              pay_amount,
                              refund_remark
                       FROM t_shopping_order_refund
                       UNION ALL
                       SELECT id,
                              `code`,
                              refund_code,
                              refund_title,
                              refund_reason,
                              refund_amount,
                              refund_total_amount,
                              refund_time,
                              pay_type,
                              pay_amount,
                              refund_remark
                       FROM t_vip_order_refund) o
        select * from (SELECT         re.id,
        re.`code`,
        re.refund_code,
        re.refund_title,
        re.refund_reason,
        re.refund_amount,
        re.refund_total_amount,
        re.refund_time,
        re.pay_type,
        re.pay_amount,
        re.refund_remark,
        co.recharge_serial_number as serail_number,
        co.payment_amount,
        co.pay_time
        FROM t_charging_order_refund re
        LEFT JOIN t_charging_order  co ON re.charging_order_id = co.id
        UNION ALL
        SELECT re.id,
        re.`code`,
        re.refund_code,
        re.refund_title,
        re.refund_reason,
        re.refund_amount,
        re.refund_total_amount,
        re.refund_time,
        re.pay_type,
        re.pay_amount,
        re.refund_remark,
        so.serial_number,
        so.payment_amount,
        so.pay_time
        FROM t_shopping_order_refund re
        LEFT JOIN t_shopping_order so on re.shopping_order_id = so.id
        UNION ALL
        SELECT vr.id,
        vr.`code`,
        vr.refund_code,
        vr.refund_title,
        vr.refund_reason,
        vr.refund_amount,
        vr.refund_total_amount,
        vr.refund_time,
        vr.pay_type,
        vr.pay_amount,
        vr.refund_remark,
        vo.serial_number,
        vo.payment_amount,
        vo.pay_time
        FROM t_vip_order_refund vr
        LEFT JOIN t_vip_order vo on vr.vip_order_id = vo.id
        ) o
        <where>
            <if test="data.code != null and data.code != ''">
                AND o.code LIKE CONCAT('%',#{data.code},'%')