<?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.ads.business.dao.DocRoleDao">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ads.business.entity.DocRole">
        <id column="id" property="id" />
        <result column="doc_id" property="docId" />
        <result column="mobile" property="mobile" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, doc_id, mobile
    </sql>
    <insert id="insertBatch" >
        insert into hsay_doc_role
        (
        doc_id, mobile)
        values
        <foreach item="item" index="index" collection="list" separator=",">
            (
            #{item.docId},
            #{item.mobile}
            )
        </foreach>
    </insert>

    <select id="getMobileList"
            resultType="java.lang.String">
        select
        mobile AS mobile
        from hsay_doc_role
        <where>
            doc_id = #{docId}
        </where>

    </select>
</mapper>
