87 lines
2.7 KiB
Java
87 lines
2.7 KiB
Java
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 DpDingShi1 {
|
|
@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);
|
|
jsonObject4.put("is_start_trigger",true);
|
|
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);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|