<?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.qs.mp.channel.mapper.ChannelWithdrawMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.qs.mp.channel.domain.ChannelWithdraw">
        <id column="id" property="id" />
        <result column="channel_id" property="channelId" />
        <result column="money" property="money" />
        <result column="charge_amt" property="chargeAmt" />
        <result column="available_money" property="availableMoney" />
        <result column="pay_type" property="payType" />
        <result column="user_name" property="userName" />
        <result column="card_no" property="cardNo" />
        <result column="bank_name" property="bankName" />
        <result column="branch_name" property="branchName" />
        <result column="status" property="status" />
        <result column="transfer_img" property="transferImg" />
        <result column="transfer_time" property="transferTime" />
        <result column="verify_content" property="verifyContent" />
        <result column="verifier" property="verifier" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, channel_id, money, charge_amt, available_money, pay_type, user_name, card_no, bank_name, branch_name, status, transfer_img, transfer_time, verify_content, verifier, create_time, update_time
    </sql>

    <select id="listWithdrawVO" resultType="com.qs.mp.channel.domain.vo.ChannelWithdrawVO">
        select t1.*, t2.name, t2.level, t2.mobile
        from mp_channel_withdraw t1
                 left join mp_channel t2 on t1.channel_id = t2.channel_id
            ${ew.customSqlSegment}
    </select>

</mapper>
