Files
RuoYi-Vue-Plus/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SocialUserMapper.xml
2023-06-15 19:30:17 +08:00

25 lines
873 B
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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="org.dromara.system.mapper.SocialUserMapper">
<resultMap type="org.dromara.system.domain.vo.SocialUserVo" id="SocialUserAuthResult">
<id property="id" column="id"/>
</resultMap>
<!-- 根据authId查询SocialUser表和SysUser表返回SocialUserAuthResult映射的对象 -->
<select id="selectSocialUserByAuthId" parameterType="String" resultMap="SocialUserAuthResult">
select b.user_id,
b.tenant_id,
b.user_name,
b.password,
a.auth_id,
a.source
from social_user a
left join sys_user b on a.user_id = b.user_id
where a.auth_id = #{authId}
</select>
</mapper>