<?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.huiju.estateagents.redpack.mapper.TaOrgAccountMapper">

    <select id="getOrgAccountById" resultType="com.huiju.estateagents.redpack.entity.TaOrgAccount">
        select
        t.miniapp_name,
        c.channel_proxy_name,
        t.purchase_amount,
        total_refund
        From ta_org_account  t
        left join ta_channel_app_relation b on t.org_id = b.org_id
        left join ta_channel_proxy c on b.channel_id = c.channel_id
        where t.org_id = #{orgId}
    </select>

</mapper>
