<?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.wzj.soopin.transaction.mapper.DivideMapper">

    <select id="getVOById" resultType="com.wzj.soopin.transaction.domain.vo.DivideVO">
        SELECT
            d.id,
            d.order_id,
            d.order_sn,
            d.order_item_id,
            d.order_item_money,
            d.actual_money,
            d.rule_id,
            d.fee,
            d.status,
            d.separate_batch_trace,
            d.create_time,
            dr.name as rule_name,
            dr.type

        FROM
            trans_divide d
                LEFT JOIN
            trans_divide_rule  dr ON d.rule_id = dr.id
        WHERE
            d.id = #{divideId}
        and d.del_flag = '0' and dr.del_flag = '0'

    </select>
</mapper>
