mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 优化 三方登录接口代码逻辑
This commit is contained in:
@ -27,6 +27,11 @@ public class SysSocial extends TenantEntity {
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 的唯一ID
|
||||
*/
|
||||
@ -57,11 +62,6 @@ public class SysSocial extends TenantEntity {
|
||||
*/
|
||||
private String openId;
|
||||
|
||||
/**
|
||||
* 用户的 ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 授权的第三方账号
|
||||
*/
|
||||
|
@ -29,6 +29,12 @@ public class SysSocialVo implements Serializable {
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@ExcelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ -70,12 +76,6 @@ public class SysSocialVo implements Serializable {
|
||||
@ExcelProperty(value = "用户的 open id")
|
||||
private String openId;
|
||||
|
||||
/**
|
||||
* 用户的 ID
|
||||
*/
|
||||
@ExcelProperty(value = "用户的 ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 授权的第三方账号
|
||||
*/
|
||||
|
@ -11,12 +11,4 @@ import org.dromara.system.domain.vo.SysSocialVo;
|
||||
*/
|
||||
public interface SysSocialMapper extends BaseMapperPlus<SysSocial, SysSocialVo> {
|
||||
|
||||
/**
|
||||
* 根据 authId 查询 SysSocial 表和 SysUser 表,返回 SysSocialAuthResult 映射的对象
|
||||
*
|
||||
* @param authId 认证ID
|
||||
* @return SysSocial
|
||||
*/
|
||||
SysSocialVo selectByAuthId(String authId);
|
||||
|
||||
}
|
||||
|
@ -86,12 +86,12 @@ public class SysSocialServiceImpl implements ISysSocialService {
|
||||
/**
|
||||
* 根据 authId 查询用户信息
|
||||
*
|
||||
* @param authId 用户id
|
||||
* @return 用户信息
|
||||
* @param authId 认证id
|
||||
* @return 授权信息
|
||||
*/
|
||||
@Override
|
||||
public SysSocialVo selectByAuthId(String authId) {
|
||||
return baseMapper.selectByAuthId(authId);
|
||||
return baseMapper.selectVoOne(new LambdaQueryWrapper<SysSocial>().eq(SysSocial::getAuthId, authId));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user