|
@@ -81,7 +81,6 @@ public class AuthController {
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping("bytedance/refreshtoken")
|
|
@GetMapping("bytedance/refreshtoken")
|
|
- public String getByteDanceAccessToken(String authCode, String accountId, String state) {
|
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public Map<String, Object> refreshToken(String accountId) {
|
|
public Map<String, Object> refreshToken(String accountId) {
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
@@ -118,7 +117,8 @@ public class AuthController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private ICTopOauthTokenService tokenService;
|
|
private ICTopOauthTokenService tokenService;
|
|
- public String getByteDanceAccessToken(String authCode, String accountId) {
|
|
|
|
|
|
+
|
|
|
|
+ public String getByteDanceAccessToken(String authCode, String accountId, String state) {
|
|
Map<String, Object> param = new HashMap<String, Object>();
|
|
Map<String, Object> param = new HashMap<String, Object>();
|
|
param.put("app_id", PropertiesUtils.getValue("bytedance_config", "bytedance_appid"));
|
|
param.put("app_id", PropertiesUtils.getValue("bytedance_config", "bytedance_appid"));
|
|
param.put("secret", PropertiesUtils.getValue("bytedance_config", "bytedance_secret"));
|
|
param.put("secret", PropertiesUtils.getValue("bytedance_config", "bytedance_secret"));
|
|
@@ -145,16 +145,9 @@ public class AuthController {
|
|
cTopOauthTokenMapper.insert(token);
|
|
cTopOauthTokenMapper.insert(token);
|
|
bindAccountService.addBindAccount(token.getAccountId(), KuaishouInterfaceConstant.TYPE_AUTHORIZATION, state, KuaishouInterfaceConstant.LOGIN_TYPE_BYTEDANCE); //账号绑定
|
|
bindAccountService.addBindAccount(token.getAccountId(), KuaishouInterfaceConstant.TYPE_AUTHORIZATION, state, KuaishouInterfaceConstant.LOGIN_TYPE_BYTEDANCE); //账号绑定
|
|
}
|
|
}
|
|
-
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- CTopOauthToken token = new CTopOauthToken(accountId,data);
|
|
|
|
- cTopOauthTokenMapper.deleteById(token.getId());
|
|
|
|
- cTopOauthTokenMapper.insert(token);
|
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|