chenbiao 1 vuosi sitten
vanhempi
sitoutus
ae0df26cf6

+ 36 - 0
netflix-web/src/main/java/com/cyksj/web/controller/manage/corp/CorpMsgAuditController.java

@@ -2,6 +2,11 @@ package com.cyksj.web.controller.manage.corp;
 
 import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpResponse;
+import cn.hutool.http.HttpUtil;
+import cn.hutool.http.Method;
+import cn.hutool.json.JSONObject;
 import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.cyksj.common.exception.BusinessRuntimeException;
@@ -29,6 +34,7 @@ import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.Collectors;
 
 /**
@@ -127,4 +133,34 @@ public class CorpMsgAuditController {
         SearchResult<QyMsgContent> search = beanSearcher.search(QyMsgContent.class, build);
         return GatewayResponse.SUCCESS.newBuilder().toResult(search);
     }
+
+    public static void main(String[] args) {
+        String str = "btrasco@gmail.com,Pennycoco12!,sess-j6S2fjE2soJYarVwyZzUTI6MIqd8Uh0ttkDlGsVQ,M-o1TTB6J4sRbnV8WJamtev7wo7hZjLrVYeIDpsbJVl6k\n" +
+                "brooksg821@gmail.com,Brooksg8,sess-lAThuqoEntPen6ytT9ELzIns3gZGRYSyBdcRGxOJ,JDlntRCa0JG7g8z9Du6Pkg4IJUxldaouPeJAbZ0Dw4jC3\n" +
+                "brianne.trester@gmail.com,Dietcoke@10,sess-Tz6bWjym5haBF5z7Z9lEwlyZ2kM7XO9F38KMXxw0,aZehhJ56U6c4yMRLWH0c-OVQDZl7_wfWMBMzrqrUXQL36\n" +
+                "a.a.riad@outlook.com,Abdullah@2020,sess-nnsFw7UE3UYguzM7IFciEidSkJQXJVIfAVU5Ba2o,blQlyMIS8lAJ-s3FbSQurGSo8rGyFWpQh1L_Ussw6dqrI";
+
+        List<String> list = Arrays.asList(str.split("\n"));
+        System.out.println(list);
+        AtomicInteger count = new AtomicInteger(713);
+        list.forEach((token)->{
+            String[] split = token.split(",");
+            String email = split[0];
+            String password = split[1];
+            String rt = split[3];
+            JSONObject rtObj = new JSONObject();
+            rtObj.putOpt("refresh_token",rt);
+            JSONObject jsonObject = new JSONObject();
+            int andIncrement = count.getAndIncrement();
+            jsonObject.putOpt("carID","P" + andIncrement);
+            jsonObject.putOpt("email", email);
+            jsonObject.putOpt("password",password);
+            jsonObject.putOpt("carName","P" + andIncrement);
+            jsonObject.putOpt("officialSession",rtObj.toString());
+            jsonObject.putOpt("status",0);
+            jsonObject.putOpt("isPlus",0);
+            HttpResponse execute = new HttpRequest("https://nf.video/8081/api/manage/account/gptCar/post/mirror/car/session").method(Method.POST).header("satoken", "da515e0c-e6ac-4e5a-8881-e3b0a9d4ffa5").body(jsonObject.toString()).execute();
+            System.out.println(jsonObject.get("carID") + ":" + execute.body());
+        });
+    }
 }