diff --git a/src/main/java/com/example/sso/newcontroller/DingShi1.java b/src/main/java/com/example/sso/newcontroller/DingShi1.java new file mode 100644 index 0000000..9bc71a9 --- /dev/null +++ b/src/main/java/com/example/sso/newcontroller/DingShi1.java @@ -0,0 +1,85 @@ +package com.example.sso.newcontroller; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.example.sso.util.V5utils; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +@Component +public class DingShi1 { + @Scheduled(cron = "0/5 * 6-23 1-15 * ?") + public void main1() { + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("app_id","665ea38ef718f1edccf7b20d"); + jsonObject.put("entry_id","68a7c86a0499bc38086d05ce"); + jsonObject.put("limit",1); + JSONArray fields = new JSONArray(); + fields.add("createTime"); + jsonObject.put("fields",fields); + + JSONObject filter = new JSONObject(); + filter.put("rel","and"); + JSONArray cond = new JSONArray(); + + JSONObject jsonObject1 = new JSONObject(); + jsonObject1.put("field","_widget_1724117232219"); + jsonObject1.put("method","eq"); + JSONArray value = new JSONArray(); + value.add(""); + jsonObject1.put("value",value); + + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("field","_widget_1717727492391"); + jsonObject2.put("method","eq"); + JSONArray value1 = new JSONArray(); + value1.add("是"); + jsonObject2.put("value",value1); + + JSONObject jsonObject6 = new JSONObject(); + jsonObject6.put("field","_widget_1724396148712"); + jsonObject6.put("method","empty"); + + + cond.add(jsonObject1); + cond.add(jsonObject6); + cond.add(jsonObject2); + filter.put("cond",cond); + jsonObject.put("filter",filter); + + String jsonString = jsonObject.toJSONString(); + String list = V5utils.list(jsonString); + System.out.println("我是数据 " +list ); + + JSONObject jsonObject3 = JSON.parseObject(list); + JSONArray data = jsonObject3.getJSONArray("data"); + for (Object o : data){ + JSONObject test = (JSONObject) o; + String id = test.getString("_id"); + + + + JSONObject jsonObject4 = new JSONObject(); + jsonObject4.put("app_id","665ea38ef718f1edccf7b20d"); + jsonObject4.put("entry_id","68a7c86a0499bc38086d05ce"); + jsonObject4.put("data_id",id); + JSONObject jsonObject5 = new JSONObject(); + + JSONObject _widget_1717726834808 = new JSONObject(); + _widget_1717726834808.put("value","是"); + jsonObject5.put("_widget_1724396148712",_widget_1717726834808); + + + + jsonObject4.put("data",jsonObject5); + + String string1 = jsonObject4.toJSONString(); + V5utils.updata(string1); + } + + + } + +} diff --git a/src/main/java/com/example/sso/newcontroller/DingShi2.java b/src/main/java/com/example/sso/newcontroller/DingShi2.java new file mode 100644 index 0000000..6e3871a --- /dev/null +++ b/src/main/java/com/example/sso/newcontroller/DingShi2.java @@ -0,0 +1,85 @@ +package com.example.sso.newcontroller; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.example.sso.util.V5utils; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +@Component +public class DingShi2 { + + @Scheduled(cron = "0/5 * 6-23 1-19 * ?") + public void main2(){ + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("app_id","665ea38ef718f1edccf7b20d"); + jsonObject.put("entry_id","665fd98bf718f1edcc00377c"); + jsonObject.put("limit",1); + JSONArray fields = new JSONArray(); + fields.add("createTime"); + jsonObject.put("fields",fields); + + JSONObject filter = new JSONObject(); + filter.put("rel","and"); + JSONArray cond = new JSONArray(); + + JSONObject jsonObject1 = new JSONObject(); + jsonObject1.put("field","_widget_1724117232219"); + jsonObject1.put("method","eq"); + JSONArray value = new JSONArray(); + value.add(""); + jsonObject1.put("value",value); + + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("field","_widget_1717727492391"); + jsonObject2.put("method","eq"); + JSONArray value1 = new JSONArray(); + value1.add("是"); + jsonObject2.put("value",value1); + + JSONObject jsonObject6 = new JSONObject(); + jsonObject6.put("field","_widget_1724396148712"); + jsonObject6.put("method","empty"); + + + cond.add(jsonObject1); + cond.add(jsonObject6); + cond.add(jsonObject2); + filter.put("cond",cond); + jsonObject.put("filter",filter); + + String jsonString = jsonObject.toJSONString(); + String list = V5utils.list(jsonString); + System.out.println("我是数据 " +list ); + + JSONObject jsonObject3 = JSON.parseObject(list); + JSONArray data = jsonObject3.getJSONArray("data"); + for (Object o : data){ + JSONObject test = (JSONObject) o; + String id = test.getString("_id"); + + + + JSONObject jsonObject4 = new JSONObject(); + jsonObject4.put("app_id","665ea38ef718f1edccf7b20d"); + jsonObject4.put("entry_id","665fd98bf718f1edcc00377c"); + jsonObject4.put("data_id",id); + JSONObject jsonObject5 = new JSONObject(); + + JSONObject _widget_1717726834808 = new JSONObject(); + _widget_1717726834808.put("value","是"); + jsonObject5.put("_widget_1724396148712",_widget_1717726834808); + + + + jsonObject4.put("data",jsonObject5); + + String string1 = jsonObject4.toJSONString(); + V5utils.updata(string1); + } + + + } +} diff --git a/src/main/java/com/example/sso/newcontroller/ZhiKongDelete.java b/src/main/java/com/example/sso/newcontroller/ZhiKongDelete.java new file mode 100644 index 0000000..d7451be --- /dev/null +++ b/src/main/java/com/example/sso/newcontroller/ZhiKongDelete.java @@ -0,0 +1,17 @@ +package com.example.sso.newcontroller; + +import com.example.sso.newdao.*; + +public class ZhiKongDelete { + public static void main(String[] args) { + DeleteZhiKong.main1(); + DeleteZhiKong1.main2(); + DeleteZhiKong2.main3(); + DeleteZhiKong3.main4(); + DeleteZhiKong4.main5(); + DeleteZhiKong5.main6(); + DeleteZhiKong6.main7(); + DeleteZhiKong7.main8(); + DeleteZhiKong8.main9(); + } +} diff --git a/src/main/java/com/example/sso/newdao/DeleteZhiKong.java b/src/main/java/com/example/sso/newdao/DeleteZhiKong.java new file mode 100644 index 0000000..3bc1b0c --- /dev/null +++ b/src/main/java/com/example/sso/newdao/DeleteZhiKong.java @@ -0,0 +1,107 @@ +package com.example.sso.newdao; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.example.sso.util.V5utils; +import lombok.extern.slf4j.Slf4j; + +import java.util.ArrayList; +import java.util.List; +@Slf4j +public class DeleteZhiKong { + + public static void main1() { + + Boolean flag = true; + String id = ""; + List lists = new ArrayList<>(); + while (flag){ + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("app_id","665ea38ef718f1edccf7b20d"); + jsonObject.put("entry_id","68abd504bf5e56180dde9e99"); + jsonObject.put("limit",10000); + JSONArray fields = new JSONArray(); + fields.add("createTime"); + jsonObject.put("fields",fields); + if (!id.equals("")){ + jsonObject.put("data_id",id); + } + + String jsonString = jsonObject.toJSONString(); + String list = V5utils.list(jsonString); + JSONObject jsonObject1 = JSON.parseObject(list); + JSONArray data = jsonObject1.getJSONArray("data"); + + + + int size = data.size(); + log.info("我是长度 " + size); + + + if (size < 10000 ) { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "68abd504bf5e56180dde9e99"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + flag = false; + + }else { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + id = string; + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "68abd504bf5e56180dde9e99"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + + + + } + + + + } + + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "68abd504bf5e56180dde9e99"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + + + + + } + +} diff --git a/src/main/java/com/example/sso/newdao/DeleteZhiKong1.java b/src/main/java/com/example/sso/newdao/DeleteZhiKong1.java new file mode 100644 index 0000000..4d828c3 --- /dev/null +++ b/src/main/java/com/example/sso/newdao/DeleteZhiKong1.java @@ -0,0 +1,105 @@ +package com.example.sso.newdao; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.example.sso.util.V5utils; +import lombok.extern.slf4j.Slf4j; + +import java.util.ArrayList; +import java.util.List; +@Slf4j +public class DeleteZhiKong1 { + public static void main2() { + + Boolean flag = true; + String id = ""; + List lists = new ArrayList<>(); + while (flag){ + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("app_id","665ea38ef718f1edccf7b20d"); + jsonObject.put("entry_id","68abd55a0499bc3808879f02"); + jsonObject.put("limit",10000); + JSONArray fields = new JSONArray(); + fields.add("createTime"); + jsonObject.put("fields",fields); + if (!id.equals("")){ + jsonObject.put("data_id",id); + } + + String jsonString = jsonObject.toJSONString(); + String list = V5utils.list(jsonString); + JSONObject jsonObject1 = JSON.parseObject(list); + JSONArray data = jsonObject1.getJSONArray("data"); + + + + int size = data.size(); + log.info("我是长度 " + size); + + + if (size < 10000 ) { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "68abd55a0499bc3808879f02"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + flag = false; + + }else { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + id = string; + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "68abd55a0499bc3808879f02"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + + + + } + + + + } + + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "68abd55a0499bc3808879f02"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + + + + + } +} diff --git a/src/main/java/com/example/sso/newdao/DeleteZhiKong2.java b/src/main/java/com/example/sso/newdao/DeleteZhiKong2.java new file mode 100644 index 0000000..5781638 --- /dev/null +++ b/src/main/java/com/example/sso/newdao/DeleteZhiKong2.java @@ -0,0 +1,105 @@ +package com.example.sso.newdao; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.example.sso.util.V5utils; +import lombok.extern.slf4j.Slf4j; + +import java.util.ArrayList; +import java.util.List; +@Slf4j +public class DeleteZhiKong2 { + public static void main3() { + + Boolean flag = true; + String id = ""; + List lists = new ArrayList<>(); + while (flag){ + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("app_id","665ea38ef718f1edccf7b20d"); + jsonObject.put("entry_id","68abd53ebf5e56180ddea983"); + jsonObject.put("limit",10000); + JSONArray fields = new JSONArray(); + fields.add("createTime"); + jsonObject.put("fields",fields); + if (!id.equals("")){ + jsonObject.put("data_id",id); + } + + String jsonString = jsonObject.toJSONString(); + String list = V5utils.list(jsonString); + JSONObject jsonObject1 = JSON.parseObject(list); + JSONArray data = jsonObject1.getJSONArray("data"); + + + + int size = data.size(); + log.info("我是长度 " + size); + + + if (size < 10000 ) { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "68abd53ebf5e56180ddea983"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + flag = false; + + }else { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + id = string; + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "68abd53ebf5e56180ddea983"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + + + + } + + + + } + + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "68abd53ebf5e56180ddea983"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + + + + + } +} diff --git a/src/main/java/com/example/sso/newdao/DeleteZhiKong3.java b/src/main/java/com/example/sso/newdao/DeleteZhiKong3.java new file mode 100644 index 0000000..0746e27 --- /dev/null +++ b/src/main/java/com/example/sso/newdao/DeleteZhiKong3.java @@ -0,0 +1,105 @@ +package com.example.sso.newdao; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.example.sso.util.V5utils; +import lombok.extern.slf4j.Slf4j; + +import java.util.ArrayList; +import java.util.List; +@Slf4j +public class DeleteZhiKong3 { + public static void main4() { + + Boolean flag = true; + String id = ""; + List lists = new ArrayList<>(); + while (flag){ + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("app_id","665ea38ef718f1edccf7b20d"); + jsonObject.put("entry_id","694e589f2b2ce8cf41e165c0"); + jsonObject.put("limit",10000); + JSONArray fields = new JSONArray(); + fields.add("createTime"); + jsonObject.put("fields",fields); + if (!id.equals("")){ + jsonObject.put("data_id",id); + } + + String jsonString = jsonObject.toJSONString(); + String list = V5utils.list(jsonString); + JSONObject jsonObject1 = JSON.parseObject(list); + JSONArray data = jsonObject1.getJSONArray("data"); + + + + int size = data.size(); + log.info("我是长度 " + size); + + + if (size < 10000 ) { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e589f2b2ce8cf41e165c0"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + flag = false; + + }else { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + id = string; + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e589f2b2ce8cf41e165c0"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + + + + } + + + + } + + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e589f2b2ce8cf41e165c0"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + + + + + } +} diff --git a/src/main/java/com/example/sso/newdao/DeleteZhiKong4.java b/src/main/java/com/example/sso/newdao/DeleteZhiKong4.java new file mode 100644 index 0000000..77fd6c2 --- /dev/null +++ b/src/main/java/com/example/sso/newdao/DeleteZhiKong4.java @@ -0,0 +1,107 @@ +package com.example.sso.newdao; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.example.sso.util.V5utils; +import lombok.extern.slf4j.Slf4j; + +import java.util.ArrayList; +import java.util.List; + +@Slf4j +public class DeleteZhiKong4 { + + public static void main5() { + + Boolean flag = true; + String id = ""; + List lists = new ArrayList<>(); + while (flag){ + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("app_id","665ea38ef718f1edccf7b20d"); + jsonObject.put("entry_id","694e2e9f4997401c0bc48444"); + jsonObject.put("limit",10000); + JSONArray fields = new JSONArray(); + fields.add("createTime"); + jsonObject.put("fields",fields); + if (!id.equals("")){ + jsonObject.put("data_id",id); + } + + String jsonString = jsonObject.toJSONString(); + String list = V5utils.list(jsonString); + JSONObject jsonObject1 = JSON.parseObject(list); + JSONArray data = jsonObject1.getJSONArray("data"); + + + + int size = data.size(); + log.info("我是长度 " + size); + + + if (size < 10000 ) { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + flag = false; + + }else { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + id = string; + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + + + + } + + + + } + + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + + + + + } +} diff --git a/src/main/java/com/example/sso/newdao/DeleteZhiKong5.java b/src/main/java/com/example/sso/newdao/DeleteZhiKong5.java new file mode 100644 index 0000000..f0e3d2b --- /dev/null +++ b/src/main/java/com/example/sso/newdao/DeleteZhiKong5.java @@ -0,0 +1,105 @@ +package com.example.sso.newdao; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.example.sso.util.V5utils; +import lombok.extern.slf4j.Slf4j; + +import java.util.ArrayList; +import java.util.List; +@Slf4j +public class DeleteZhiKong5 { + public static void main6() { + + Boolean flag = true; + String id = ""; + List lists = new ArrayList<>(); + while (flag){ + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("app_id","665ea38ef718f1edccf7b20d"); + jsonObject.put("entry_id","6667e754f718f1edcc1ba298"); + jsonObject.put("limit",10000); + JSONArray fields = new JSONArray(); + fields.add("createTime"); + jsonObject.put("fields",fields); + if (!id.equals("")){ + jsonObject.put("data_id",id); + } + + String jsonString = jsonObject.toJSONString(); + String list = V5utils.list(jsonString); + JSONObject jsonObject1 = JSON.parseObject(list); + JSONArray data = jsonObject1.getJSONArray("data"); + + + + int size = data.size(); + log.info("我是长度 " + size); + + + if (size < 10000 ) { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + flag = false; + + }else { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + id = string; + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + + + + } + + + + } + + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + + + + + } +} diff --git a/src/main/java/com/example/sso/newdao/DeleteZhiKong6.java b/src/main/java/com/example/sso/newdao/DeleteZhiKong6.java new file mode 100644 index 0000000..115d033 --- /dev/null +++ b/src/main/java/com/example/sso/newdao/DeleteZhiKong6.java @@ -0,0 +1,105 @@ +package com.example.sso.newdao; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.example.sso.util.V5utils; +import lombok.extern.slf4j.Slf4j; + +import java.util.ArrayList; +import java.util.List; +@Slf4j +public class DeleteZhiKong6 { + public static void main7() { + + Boolean flag = true; + String id = ""; + List lists = new ArrayList<>(); + while (flag){ + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("app_id","665ea38ef718f1edccf7b20d"); + jsonObject.put("entry_id","66696a25f718f1edcc29d436"); + jsonObject.put("limit",10000); + JSONArray fields = new JSONArray(); + fields.add("createTime"); + jsonObject.put("fields",fields); + if (!id.equals("")){ + jsonObject.put("data_id",id); + } + + String jsonString = jsonObject.toJSONString(); + String list = V5utils.list(jsonString); + JSONObject jsonObject1 = JSON.parseObject(list); + JSONArray data = jsonObject1.getJSONArray("data"); + + + + int size = data.size(); + log.info("我是长度 " + size); + + + if (size < 10000 ) { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + flag = false; + + }else { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + id = string; + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + + + + } + + + + } + + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + + + + + } +} diff --git a/src/main/java/com/example/sso/newdao/DeleteZhiKong7.java b/src/main/java/com/example/sso/newdao/DeleteZhiKong7.java new file mode 100644 index 0000000..cff1470 --- /dev/null +++ b/src/main/java/com/example/sso/newdao/DeleteZhiKong7.java @@ -0,0 +1,105 @@ +package com.example.sso.newdao; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.example.sso.util.V5utils; +import lombok.extern.slf4j.Slf4j; + +import java.util.ArrayList; +import java.util.List; +@Slf4j +public class DeleteZhiKong7 { + public static void main8() { + + Boolean flag = true; + String id = ""; + List lists = new ArrayList<>(); + while (flag){ + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("app_id","665ea38ef718f1edccf7b20d"); + jsonObject.put("entry_id","66626e72f718f1edcc1063eb"); + jsonObject.put("limit",10000); + JSONArray fields = new JSONArray(); + fields.add("createTime"); + jsonObject.put("fields",fields); + if (!id.equals("")){ + jsonObject.put("data_id",id); + } + + String jsonString = jsonObject.toJSONString(); + String list = V5utils.list(jsonString); + JSONObject jsonObject1 = JSON.parseObject(list); + JSONArray data = jsonObject1.getJSONArray("data"); + + + + int size = data.size(); + log.info("我是长度 " + size); + + + if (size < 10000 ) { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + flag = false; + + }else { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + id = string; + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + + + + } + + + + } + + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + + + + + } +} diff --git a/src/main/java/com/example/sso/newdao/DeleteZhiKong8.java b/src/main/java/com/example/sso/newdao/DeleteZhiKong8.java new file mode 100644 index 0000000..2b72d36 --- /dev/null +++ b/src/main/java/com/example/sso/newdao/DeleteZhiKong8.java @@ -0,0 +1,105 @@ +package com.example.sso.newdao; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.example.sso.util.V5utils; +import lombok.extern.slf4j.Slf4j; + +import java.util.ArrayList; +import java.util.List; +@Slf4j +public class DeleteZhiKong8 { + public static void main9() { + + Boolean flag = true; + String id = ""; + List lists = new ArrayList<>(); + while (flag){ + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("app_id","665ea38ef718f1edccf7b20d"); + jsonObject.put("entry_id","6667dd8a09f3185646f17f81"); + jsonObject.put("limit",10000); + JSONArray fields = new JSONArray(); + fields.add("createTime"); + jsonObject.put("fields",fields); + if (!id.equals("")){ + jsonObject.put("data_id",id); + } + + String jsonString = jsonObject.toJSONString(); + String list = V5utils.list(jsonString); + JSONObject jsonObject1 = JSON.parseObject(list); + JSONArray data = jsonObject1.getJSONArray("data"); + + + + int size = data.size(); + log.info("我是长度 " + size); + + + if (size < 10000 ) { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + flag = false; + + }else { + for (Object o : data) { + JSONObject test = (JSONObject) o; + String string = test.getString("_id"); + lists.add(string); + id = string; + if (lists.size() == 100) { + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + } + } + + + + + + + } + + + + } + + JSONObject jsonObject2 = new JSONObject(); + jsonObject2.put("app_id", "665ea38ef718f1edccf7b20d"); + jsonObject2.put("entry_id", "694e2e9f4997401c0bc48444"); + jsonObject2.put("data_ids", lists); + String jsonString1 = jsonObject2.toJSONString(); + log.info("我是删除参数 " + jsonString1); + V5utils.deletes(jsonString1); + lists.clear(); + + + + + } +}