chenbiao 1 жил өмнө
parent
commit
ce245b9f2d

+ 6 - 3
netflix-service/src/main/java/com/cyksj/service/chatgpt/impl/ChatGptAccountServiceImpl.java

@@ -102,8 +102,9 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
             at.setAccount(account);
             at.setPassword(password);
             JSONObject loginResult = getLoginResult(at);
-            if (StringUtils.isBlank(loginResult.getStr("accessToken"))) {
-                throw BusinessRuntimeException.getInstance(loginResult.getStr("detail"));
+            String str = loginResult.getStr("detail");
+            if (StringUtils.isBlank(str)) {
+                throw BusinessRuntimeException.getInstance("登录获取token错误 error:" + str);
             }
             officialSession = loginResult.toString();
         } catch (Exception e) {
@@ -126,7 +127,9 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
         request.form("password", account.getPassword());
         request.header("Content-Type", "application/x-www-form-urlencoded");
         HttpResponse execute = request.method(Method.POST).execute();
-        return new JSONObject(execute.body());
+        String body = execute.body();
+        log.info("登录返回token res:{}", body);
+        return new JSONObject(body);
     }