<?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.jeeplus.test.cw.workClientInfo.mapper.CwWorkClientBillingMapper">

    <resultMap id="BaseResultMap" type="com.jeeplus.test.cw.workClientInfo.service.dto.CwWorkClientBillingDTO">
            <id property="id" column="id" jdbcType="VARCHAR"/>
            <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
            <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
            <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
            <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
            <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
            <result property="clientId" column="client_id" jdbcType="VARCHAR"/>
            <result property="isTaxpayerIdentificationNo" column="is_taxpayer_identification_no" jdbcType="VARCHAR"/>
            <result property="taxpayerIdentificationNo" column="taxpayer_identification_no" jdbcType="VARCHAR"/>
            <result property="accountHolder" column="account_holder" jdbcType="VARCHAR"/>
            <result property="account" column="account" jdbcType="VARCHAR"/>
            <result property="phone" column="phone" jdbcType="VARCHAR"/>
            <result property="address" column="address" jdbcType="VARCHAR"/>
            <result property="companyName" column="company_name" jdbcType="VARCHAR"/>
    </resultMap>

    <sql id="Billing_Column_List">
        cw_wcbi.id,
        cw_wcbi.create_by,
        cw_wcbi.create_date,
        cw_wcbi.update_by,
        cw_wcbi.update_date,
        cw_wcbi.del_flag,
        cw_wcbi.remarks,
        cw_wcbi.client_id,
        cw_wcbi.is_taxpayer_identification_no,
        cw_wcbi.taxpayer_identification_no,
        cw_wcbi.account_holder,
        cw_wcbi.account,
        cw_wcbi.phone,
        cw_wcbi.address,
        cw_wcbi.company_name
    </sql>

    <select id="getBillingListByClientId" resultMap="BaseResultMap">
        select
        <include refid="Billing_Column_List"></include>
        from cw_work_client_billing cw_wcbi
        ${ew.customSqlSegment}
    </select>
</mapper>
