<?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.github.wxiaoqi.security.admin.mapper.AppUserLoginMapper">

    <select id="selectbyPhones" resultType="com.github.wxiaoqi.security.admin.entity.AppUserLogin">
        select `id`,`username` from `app_user_login` where `username` in
        <foreach collection="phones" item="phone" open="(" close=")" separator=",">
          #{phone}
        </foreach>
    </select>
    
    <update id="bindOpenId" parameterType="com.github.wxiaoqi.security.admin.entity.AppUserLogin">
        UPDATE  app_user_login SET wx_openid=#{wxOpenid},unionid=#{unionid},openid=#{openid} where  id=#{id}
    </update>

    <select id="selectAllExistUserIds" resultType="integer">
        SELECT  `id` FROM `app_user_login`  WHERE `isdel`=0;
    </select>
</mapper>