<?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.njzscloud.dispose.cst.order.mapper.OrderPaymentRecordMapper">

    <select id="listPaymentRecord"
            resultType="com.njzscloud.dispose.cst.order.pojo.result.SearchOrderPaymentRecordResult">
        SELECT a.id,
        a.order_id,
        a.expense_item_id,
        a.trans_id,
        a.quantity,
        a.payment_status,
        a.pay_time,
        a.refund_time,
        a.total_money,
        a.discount_money,
        a.revise_money,
        a.settle_money,
        a.settlement_way,
        a.payer_user_id,
        a.payer_customer_id,
        a.payer_money_account_id,
        b.expense_item_category,
        b.goods_id,
        b.expense_item_name,
        b.expense_strategy,
        b.unit,
        b.tax_rate,
        b.unit_price,
        b.initial_price,
        b.initial_quantity,
        b.every_quantity
        FROM cst_order_payment_record a
        INNER JOIN cst_order_expense_items b ON b.id = a.expense_item_id
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
            ${ew.customSqlSegment}
        </if>
    </select>
</mapper>


