<?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.ai.da.mapper.AccountMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ai.da.mapper.entity.Account">
        <id column="id" property="id" />
        <result column="user_email" property="userEmail" />
        <result column="user_name" property="userName" />
        <result column="user_password" property="userPassword" />
        <result column="create_date" property="createDate" />
    </resultMap>
    <select id="findByPhoneList" resultType="com.ai.da.mapper.entity.Account">
        select id , user_email AS userEmail, user_Name AS userName,
               user_password AS userPassword from t_account
        where user_Name in
        <foreach collection="phoneList" item="phone" open="(" separator="," close=")">
            #{phone}
        </foreach>
    </select>
    <select id="findById" resultType="com.ai.da.mapper.entity.Account">
        select id ,user_email AS userEmail, user_phone AS userPhone,
        user_password AS userPassword from t_account
        where id =  #{id}
    </select>

</mapper>
