代码说明

This commit is contained in:
lijiazhuo
2026-01-08 09:53:39 +08:00
parent ab55c0debb
commit 72b8a0e5bb
12 changed files with 1136 additions and 0 deletions

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}

View File

@ -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();
}
}