<?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.store.StoreMasterSignerInfoMapper">
  <resultMap id="BaseResultMap" type="com.cool.store.entity.store.StoreMasterSignerInfoDO">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="store_id" jdbcType="VARCHAR" property="storeId" />
    <result column="signer1_name" jdbcType="VARCHAR" property="signer1Name" />
    <result column="signer1_mobile" jdbcType="VARCHAR" property="signer1Mobile" />
    <result column="signer1_id_card_no" jdbcType="VARCHAR" property="signer1IdCardNo" />
    <result column="signer1_id_card_front" jdbcType="VARCHAR" property="signer1IdCardFront" />
    <result column="signer1_id_card_back" jdbcType="VARCHAR" property="signer1IdCardBack" />
    <result column="signer2_name" jdbcType="VARCHAR" property="signer2Name" />
    <result column="signer2_mobile" jdbcType="VARCHAR" property="signer2Mobile" />
    <result column="signer2_id_card_no" jdbcType="VARCHAR" property="signer2IdCardNo" />
    <result column="signer2_id_card_front" jdbcType="VARCHAR" property="signer2IdCardFront" />
    <result column="signer2_id_card_back" jdbcType="VARCHAR" property="signer2IdCardBack" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  </resultMap>
  <sql id="Base_Column_List">
    id, store_id, signer1_name, signer1_mobile, signer1_id_card_no, signer1_id_card_front, 
    signer1_id_card_back, signer2_name, signer2_mobile, signer2_id_card_no, signer2_id_card_front, 
    signer2_id_card_back, create_time, update_time
  </sql>

  <select id="selectByStoreIds" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List"/>
    from store_master_signer_info_${enterpriseId}
    where store_id in
    <foreach item="storeId" collection="storeIds" open="(" separator="," close=")">
      #{storeId}
    </foreach>
  </select>
</mapper>