<?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.kxs.user.biz.mapper.KxsUserWithdrawalMapper">

    <resultMap type="com.kxs.user.api.model.KxsUserWithdrawal" id="KxsUserWithdrawalMap">
        <result column="id" property="id" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
        <result column="del_flag" property="delFlag" />
        <result column="version" property="version" />
        <result column="user_id" property="userId" />
        <result column="apply_amount" property="applyAmount" />
        <result column="real_amount" property="realAmount" />
        <result column="tax_amount" property="taxAmount" />
        <result column="service_amount" property="serviceAmount" />
        <result column="apply_no" property="applyNo" />
        <result column="remark" property="remark" />
        <result column="bank_name" property="bankName" />
        <result column="bank_code" property="bankCode" />
        <result column="status" property="status" />
        <result column="apply_status" property="applyStatus" />
        <result column="result" property="result" />
        <result column="channel_name" property="channelName" />
        <result column="withdrawal_type" property="withdrawalType" />

    </resultMap>
    <select id="getByPage" resultType="com.kxs.user.api.vo.kxsapp.userAccount.WithdrawListVO">
        select a.*, CONCAT(b.bank_name,'(', bank_code,')') as title  from kxs_user_withdrawal a
        left join  kxs_user_bank b on a.bank_id = b.id
        <where>
            a.del_flag = 0
        </where>
    </select>

</mapper>
