<?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="cn.newfeifan.mall.module.system.dal.mysql.social.SocialUserMapper">

    <select id="getOpenIdByUserId" resultType="string" parameterType="long">
        SELECT openid FROM `system_social_user` u
        left join system_social_user_bind b on u.id = b.social_user_id
        where b.user_id = #{userId} and b.deleted = 0
    </select>
</mapper>
