syh %!s(int64=5) %!d(string=hai) anos
pai
achega
35d9bc3469

+ 2 - 9
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AuthController.java

@@ -81,7 +81,6 @@ public class AuthController {
     }
 
     @GetMapping("bytedance/refreshtoken")
-    public String getByteDanceAccessToken(String authCode, String accountId, String state) {
     @ResponseBody
     public Map<String, Object> refreshToken(String accountId) {
         Map<String, Object> resultMap = new HashMap<>();
@@ -118,7 +117,8 @@ public class AuthController {
 
     @Autowired
     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>();
         param.put("app_id", PropertiesUtils.getValue("bytedance_config", "bytedance_appid"));
         param.put("secret", PropertiesUtils.getValue("bytedance_config", "bytedance_secret"));
@@ -145,16 +145,9 @@ public class AuthController {
                 cTopOauthTokenMapper.insert(token);
                 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){
             e.printStackTrace();
         }
         return result;
     }
-
-
 }