75 lines
2.4 KiB
Java
75 lines
2.4 KiB
Java
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 FengXianXinXi_ {
|
|
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", "67f5015829096e59acb03542");
|
|
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","67f5015829096e59acb03542");
|
|
jsonObject.put("data_id",id);
|
|
JSONObject data = new JSONObject();
|
|
|
|
|
|
JSONObject effectiveness = new JSONObject();
|
|
effectiveness.put("value","");
|
|
data.put("match_field",effectiveness);
|
|
|
|
|
|
|
|
jsonObject.put("data",data);
|
|
String jsonString = jsonObject.toJSONString();
|
|
String updata = V5utils.updata(jsonString);
|
|
System.out.println(updata);
|
|
|
|
|
|
}
|
|
}
|