<?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.liquidnet.service.adam.mapper.AdamUserMapper">
    <resultMap id="BaseResult" type="com.liquidnet.service.adam.dto.AdamUserInfoDto">
        <result column="uid" property="uid" jdbcType="VARCHAR"/>
        <result column="mobile" property="mobile" jdbcType="VARCHAR"/>
    </resultMap>

<!--    <select id="selectByPhone" resultMap="BaseResult">-->
<!--        select uid, mobile-->
<!--        from adam_user-->
<!--        where mobile = #{mobile,jdbcType=VARCHAR}-->
<!--    </select>-->

    <select id="selectByPhones" resultMap="BaseResult">
        select uid,mobile from adam_user where mobile in
        <foreach collection="mobiles.split(',')" item="mobile" open="(" separator="," close=")">
            #{mobile}
        </foreach>
    </select>

    <update id="executeForDM">
        TRUNCATE TABLE ${tn}
    </update>
</mapper>
