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; public class RenYuanYinHangZhangHus { public static JSONArray add() { JSONObject jsonObject = new JSONObject(); jsonObject.put("app_id", "675b8d1a24d61bca7bf1cb4c"); jsonObject.put("entry_id", "677b6e1687d6def223e47d42"); jsonObject.put("limit", 99999999); JSONObject filter = new JSONObject(); filter.put("rel", "and"); JSONArray cond = new JSONArray(); JSONObject jsonObject1 = new JSONObject(); jsonObject1.put("field", "is_check"); jsonObject1.put("method", "eq"); JSONArray value = new JSONArray(); value.add("是"); jsonObject1.put("value", value); cond.add(jsonObject1); filter.put("cond", cond); jsonObject.put("filter", filter); String jsonString = jsonObject.toJSONString(); String list = V5utils.list(jsonString); JSONObject jsonObject11 = JSON.parseObject(list); JSONArray jsonArray = jsonObject11.getJSONArray("data"); return jsonArray; } public static void updata(String id, String code, String msg) { JSONObject jsonObject = new JSONObject(); jsonObject.put("app_id", "675b8d1a24d61bca7bf1cb4c"); jsonObject.put("entry_id", "677b6e1687d6def223e47d42"); jsonObject.put("data_id", id); jsonObject.put("is_start_trigger", true); JSONObject data = new JSONObject(); JSONObject code_state = new JSONObject(); code_state.put("value",code); data.put("code_state",code_state); JSONObject code_note = new JSONObject(); code_note.put("value",msg); data.put("code_note",code_note); JSONObject is_check = new JSONObject(); is_check.put("value","否"); data.put("is_check",is_check); jsonObject.put("data", data); String jsonString = jsonObject.toJSONString(); V5utils.updata(jsonString); } }