<?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.DivideDetailMapper">

    <select id="getMoney" resultType="java.math.BigDecimal">
        SELECT
            sum( dd.money ) AS pending_money

        FROM
            trans_divide_detail dd
                LEFT JOIN trans_divide d ON d.id = dd.divide_id
        WHERE
            dd.account_id = #{accountId}
          AND d.STATUS =#{status}
          and d.del_flag = '0' and dd.del_flag = '0'

    </select>
</mapper>
