<?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.cool.store.mapper.BuildInformationMapper">

    <resultMap id="BaseResultMap" type="com.cool.store.entity.BuildInformationDO">
        <id property="id" column="id" jdbcType="BIGINT"/>
        <result property="shopId" column="shop_id" jdbcType="BIGINT"/>
        <result property="shopContactName" column="shop_contact_name" jdbcType="VARCHAR"/>
        <result property="shopContactMobile" column="shop_contact_mobile" jdbcType="VARCHAR"/>
        <result property="businessHours" column="business_hours" jdbcType="VARCHAR"/>
        <result property="businessMobile" column="business_mobile" jdbcType="VARCHAR"/>
        <result property="doorPhoto" column="door_photo" jdbcType="VARCHAR"/>
        <result property="inStorePhoto" column="in_store_photo" jdbcType="VARCHAR"/>
        <result property="juridicalIdCardFront" column="juridical_id_card_front" jdbcType="VARCHAR"/>
        <result property="juridicalIdCardReverse" column="juridical_id_card_reverse" jdbcType="VARCHAR"/>
        <result property="juridicalHandheldIdCardFront" column="juridical_handheld_id_card_front" jdbcType="VARCHAR"/>
        <result property="juridicalHandheldIdCardReverse" column="juridical_handheld_id_card_reverse"
                jdbcType="VARCHAR"/>
        <result property="juridicalIdCardNo" column="juridical_id_card_no" jdbcType="VARCHAR"/>
        <result property="juridicalName" column="juridical_name" jdbcType="VARCHAR"/>
        <result property="settlerName" column="settler_name" jdbcType="VARCHAR"/>
        <result property="settlerIdCardFront" column="settler_id_card_front" jdbcType="VARCHAR"/>
        <result property="settlerIdCardReverse" column="settler_id_card_reverse" jdbcType="VARCHAR"/>
        <result property="settlerInHandFrontPicture" column="settler_in_hand_front_picture" jdbcType="VARCHAR"/>
        <result property="settlerInHandBackPicture" column="settler_in_hand_back_picture" jdbcType="VARCHAR"/>
        <result property="settlerIdCardNo" column="settler_id_card_no" jdbcType="VARCHAR"/>
        <result property="settlerBankPhotoUrl" column="settler_bank_photo_url" jdbcType="VARCHAR"/>
        <result property="settlerBankNumber" column="settler_bank_number" jdbcType="VARCHAR"/>
        <result property="settlerBankMobile" column="settler_bank_mobile" jdbcType="VARCHAR"/>
        <result property="settlerBankName" column="settler_bank_name" jdbcType="VARCHAR"/>
        <result property="authorizationUrl" column="authorization_url" jdbcType="VARCHAR"/>
        <result property="relationshipProve" column="relationship_prove" jdbcType="VARCHAR"/>
        <result property="accountOpeningPermit" column="account_opening_permit" jdbcType="VARCHAR"/>
        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
        <result property="createUser" column="create_user" jdbcType="VARCHAR"/>
        <result property="updateUser" column="update_user" jdbcType="VARCHAR"/>
        <result property="cShopName" column="c_shop_name" jdbcType="VARCHAR"/>
        <result property="settlerBankBackPhotoUrl" column="settler_bank_back_photo_url" jdbcType="VARCHAR"/>
        <result property="settlerIsSamePartner" column="settler_is_same_partner" jdbcType="TINYINT"/>
        <result property="juridicalIsSamePartner" column="juridical_is_same_partner" jdbcType="TINYINT"/>
    </resultMap>

    <sql id="Base_Column_List">
        id
        ,shop_id,shop_contact_name,
        shop_contact_mobile,business_hours,business_mobile,settler_bank_photo_url,juridical_id_card_no,
        door_photo,in_store_photo,juridical_id_card_front,authorizationUrl,relationshipProve,accountOpeningPermit,
        juridical_id_card_reverse,juridical_handheld_id_card_front,juridical_handheld_id_card_reverse,settler_name,
        settler_id_card_front,settler_id_card_reverse,settler_in_hand_front_picture,settler_in_hand_back_picture,settler_id_card_no,
        settler_bank_number,settler_bank_mobile,settler_bank_name,
        create_time,update_time,create_user,
        update_user,c_shop_name,settler_bank_back_photo_url,settler_is_same_partner,juridical_is_same_partner,juridical_name
    </sql>
    <insert id="batchInsertSpecific">
        <foreach collection="list" item="item" index="index" separator=";">
            insert into xfsg_build_information (shop_id)
            VALUE(#{item})
        </foreach>
    </insert>
    <select id="getSpecificByShopIdList" resultType="com.cool.store.entity.BuildInformationDO">
        select shop_id as shopId, c_shop_name as cShopName
        from  xfsg_build_information
        where shop_id in
        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
            #{item}
        </foreach>
    </select>
</mapper>
