first commit
This commit is contained in:
75
src/main/java/com/example/sso/dao/GouTongXinXi_.java
Normal file
75
src/main/java/com/example/sso/dao/GouTongXinXi_.java
Normal file
@ -0,0 +1,75 @@
|
||||
package com.example.sso.dao;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.util.V5utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GouTongXinXi_ {
|
||||
|
||||
public static void list(String data_sources1,String lossseqno1) {
|
||||
ArrayList<String> de = new ArrayList<>();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id", "67f500fe34853d8f6e8d1adf");
|
||||
jsonObject.put("limit", 10000);
|
||||
|
||||
JSONObject filter = new JSONObject();
|
||||
filter.put("rel","and");
|
||||
JSONArray cond = new JSONArray();
|
||||
|
||||
// JSONObject data_sources = new JSONObject();
|
||||
// data_sources.put("field","data_sources");
|
||||
// data_sources.put("method","eq");
|
||||
// JSONArray jsonArraydata_sources = new JSONArray();
|
||||
// jsonArraydata_sources.add(data_sources1);
|
||||
// data_sources.put("value",jsonArraydata_sources);
|
||||
|
||||
JSONObject lossseqno = new JSONObject();
|
||||
lossseqno.put("field","lossseqno");
|
||||
lossseqno.put("method","eq");
|
||||
JSONArray jsonArraydata_sources1 = new JSONArray();
|
||||
jsonArraydata_sources1.add(lossseqno1);
|
||||
lossseqno.put("value",jsonArraydata_sources1);
|
||||
// cond.add(data_sources);
|
||||
cond.add(lossseqno);
|
||||
filter.put("cond",cond);
|
||||
jsonObject.put("filter",filter);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String list = V5utils.list(jsonString);
|
||||
JSONObject DATS = JSON.parseObject(list);
|
||||
JSONArray jsonArray1 = DATS.getJSONArray("data");
|
||||
for (Object o : jsonArray1){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String string = test.getString("_id");
|
||||
|
||||
up(string);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void up(String id) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id","6790ca1682b769eeefb022f2");
|
||||
jsonObject.put("entry_id","67f500fe34853d8f6e8d1adf");
|
||||
jsonObject.put("data_id",id);
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
JSONObject effectiveness = new JSONObject();
|
||||
effectiveness.put("value","失效");
|
||||
data.put("effectiveness",effectiveness);
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data",data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String updata = V5utils.updata(jsonString);
|
||||
System.out.println(updata);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user