TASK:AiDA
This commit is contained in:
@@ -2432,7 +2432,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean bindGoogle(String credential) {
|
||||
public AccountExtend bindGoogle(String credential) {
|
||||
try {
|
||||
// 配置 Google ID Token 验证器
|
||||
GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder(
|
||||
@@ -2466,7 +2466,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
accountExtendInsert.setAccountId(authPrincipalVo.getId());
|
||||
accountExtendMapper.insert(accountExtendInsert);
|
||||
|
||||
return Boolean.TRUE;
|
||||
return accountExtendInsert;
|
||||
} else {
|
||||
throw new IllegalArgumentException("Invalid ID token.");
|
||||
}
|
||||
@@ -2478,7 +2478,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean bindWeChat(String code) {
|
||||
public AccountExtend bindWeChat(String code) {
|
||||
// 1. 获取 access_token 和 openid
|
||||
JSONObject accessTokenResponse = getAccessTokenFromWeChat(code);
|
||||
String accessToken = accessTokenResponse.getString("access_token");
|
||||
@@ -2508,7 +2508,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
||||
accountExtendInsert.setAccountId(authPrincipalVo.getId());
|
||||
accountExtendMapper.insert(accountExtendInsert);
|
||||
|
||||
return Boolean.TRUE;
|
||||
return accountExtendInsert;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user