package com.juxin.client.websocket; import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DateUtil; import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; import com.juxin.client.websocket.constant.GfConstants; import com.juxin.client.websocket.enums.WebsocketTypeEnum; import com.juxin.client.websocket.ppojo.WebsocketInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; import org.springframework.web.socket.client.WebSocketClient; import javax.annotation.PostConstruct; import javax.websocket.ContainerProvider; import javax.websocket.Session; import javax.websocket.WebSocketContainer; import java.net.URI; import java.util.*; @Component public class FindTask { public static String Address1 = "ws://127.0.0.1:9990/pythonInteractive/websocket/pythonClient"; public static final String[] status = {"success", "success", "fail", "success", "success", "stop", "success"}; public static final String[] ERR_MSG = {"失败原因1", "失败原因2", "失败原因3", "失败原因4", "失败原因5", "失败原因6", "失败原因7"}; //机构已反馈 机构暂未反馈 机构反馈失败,失败原因xxx 国反异常,获取结果失败 public static final String[] SPLIT_RESULT = {"机构已反馈", "机构暂未反馈", "机构反馈失败,失败原因1", "机构已反馈", "国反异常,获取结果失败", "机构已反馈", "机构反馈失败,失败原因2", "机构已反馈", "机构反馈失败,失败原因3", "机构已反馈", "机构已反馈"}; @Autowired private com.juxin.client.websocket.WebSocketClient client; public void init() { try { WebSocketContainer container = ContainerProvider.getWebSocketContainer(); client = new com.juxin.client.websocket.WebSocketClient(); Session session = container.connectToServer(client, new URI(Address1)); client.setUserSession(session); // client.sendMessage("{ \"infoType\": \"heart\", \"postType\": \"python\", \"methodType\": \"heart\", \"reqJson\": { \"receiveJobStatus\": \"1\", \"msg\": \"ping\" } }"); } catch (Exception e) { e.printStackTrace(); } } @Scheduled(cron = "*/20 * * * * ?") public void heart() throws Exception { if (client == null || client.getUserSession() == null) { init(); } try { // 发送消息 client.sendMessage("{ \"infoType\": \"heart\", \"postType\": \"python\", \"methodType\": \"heart\", \"reqJson\": { \"receiveJobStatus\": \"1\", \"msg\": \"ping\" } }"); } catch (Exception e) { e.printStackTrace(); } } @Scheduled(cron = "*/5 * * * * ?") public void findResultTask() { if (client == null || client.getUserSession() == null) { return; } if (!GfConstants.FIND_RESULT_FLAG) { System.out.println("不具备获取结果状态,获取任务标志为false,证明有回捞任务在运行中**********************************"); return; } try { // 发送消息 client.sendMessage("{ \"infoType\": \"getResultQueueJob\", \"postType\": \"python\", \"methodType\": \"getResultQueueJob\" }"); GfConstants.FIND_RESULT_FLAG = false; // 保持连接一段时间 } catch (Exception e) { e.printStackTrace(); } } @Scheduled(cron = "*/20 * * * * ?") public void findTask() { if (client == null || client.getUserSession() == null) { return; } if (!GfConstants.FIND_FLAG) { System.out.println("不具备获取任务状态,获取任务标志为false,证明有任务在运行中**********************************"); return; } try { // 发送消息 client.sendMessage("{ \"infoType\": \"getQueueJob\", \"postType\": \"python\", \"methodType\": \"getQueueJob\" }"); GfConstants.FIND_FLAG = false; // 保持连接一段时间 } catch (Exception e) { e.printStackTrace(); } } public void dealTask(String message) { try { String result = ""; WebsocketInfo bean = JSONUtil.toBean(message, WebsocketInfo.class); WebsocketTypeEnum enumByType = WebsocketTypeEnum.getEnumByType(bean.getInfoType()); int i = RandomUtil.randomInt(0, 3); System.out.println("开始睡眠,睡眠时间" + i + "*********************************************"); //Thread.sleep(i * 1000); switch (enumByType) { case COMMIT_MSG: result = commitTask(bean); if (result == null || result == "") { GfConstants.FIND_FLAG = true; } else { try { client.sendMessage(result); } finally { GfConstants.FIND_FLAG = true; } } break; case RESULT_LIST_MSG: result = searchTask(bean); if (result == "") { System.out.println("无回捞结果任务"); return; } try { client.sendMessage(result); } finally { GfConstants.FIND_RESULT_FLAG = true; } break; case GET_RESULT_QUEUE_JOB: result = searchTask(bean); if (result == "") { return; } break; case ALARM_DATA: result = alarmWork(bean); if (result == "") { return; } break; default: return; } } catch (Exception e) { System.out.println("出现位置异常*******************:" + message); throw new RuntimeException(e); } } /** * 提交任务 * * @param bean * @return */ public String commitTask(WebsocketInfo bean) { String result = ""; String methodType = bean.getMethodType(); Object reqJson = bean.getReqJson(); if (Objects.isNull(reqJson) || reqJson == "") { return result; } if (StrUtil.isBlankIfStr(methodType) || StrUtil.isBlankIfStr(reqJson) || reqJson == "" || reqJson == null) { return result; } switch (methodType) { case "bankCommit": result = bankCommitTask(reqJson); break; case "thirdCommit": result = thirdCommitTask(reqJson); break; case "serialCommit": result = serialCommitTask(reqJson); break; case "allAccountCommit": result = allAccountCommitTask(reqJson); break; case "bankAllAccountCommit": result = bankAllAccountCommitTask(reqJson); break; case "thirdSubjectCommit": result = thirdSubjectCommitTask(reqJson); break; default: break; } return result; } public String bankCommitTask(Object reqJson) { JSONObject jsonObject = JSONUtil.parseObj(reqJson); Map result = new HashMap<>(); result.put("infoType", "over"); result.put("postType", "python"); result.put("methodType", "bankCommit"); Map req = new HashMap<>(); req.put("recordId", jsonObject.get("groupId")); req.put("groupId", jsonObject.get("groupId")); String jobState = status[RandomUtil.randomInt(0, 6)]; req.put("jobState", jobState); if (Objects.equals(jobState, "success")) { List> split = new ArrayList<>(); List> list = jsonObject.get("list", List.class); list.forEach(e -> { Map map = new HashMap<>(); map.put("applicationid", IdUtil.fastSimpleUUID()); map.put("bankCard", e.get("bankCard")); map.put("result", "0000"); map.put("maninBodyType", e.get("maninBodyType")); map.put("bankName", Objects.toString(jsonObject.get("bankname"))); map.put("splitTime", DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN) + "-" + DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN)); split.add(map); }); req.put("bankSplits", split); } else { req.put("errorMsg", status[RandomUtil.randomInt(0, 6)]); } result.put("reqJson", req); return JSONUtil.toJsonStr(result); } public String thirdCommitTask(Object reqJson) { JSONObject jsonObject = JSONUtil.parseObj(reqJson); Map result = new HashMap<>(); result.put("infoType", "over"); result.put("postType", "python"); result.put("methodType", "thirdCommit"); Map req = new HashMap<>(); req.put("recordId", jsonObject.get("groupId")); req.put("groupId", jsonObject.get("groupId")); String jobState = status[RandomUtil.randomInt(0, 6)]; req.put("jobState", jobState); if (Objects.equals(jobState, "success")) { List> split = new ArrayList<>(); List> list = jsonObject.get("list", List.class); list.forEach(e -> { Map map = new HashMap<>(); map.put("applicationid", IdUtil.fastSimpleUUID()); map.put("data", e.get("accountNo")); map.put("searchAgency", Objects.toString(jsonObject.get("searchAgency"))); map.put("result", "0000"); map.put("accountSearchType", e.get("accountSearchType")); map.put("splitTime", DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN) + "-" + DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN)); split.add(map); }); req.put("thirdFundsSplits", split); } else { req.put("errorMsg", status[RandomUtil.randomInt(0, 6)]); } result.put("reqJson", req); return JSONUtil.toJsonStr(result); } public String serialCommitTask(Object reqJson) { JSONObject jsonObject = JSONUtil.parseObj(reqJson); Map result = new HashMap<>(); result.put("infoType", "over"); result.put("postType", "python"); result.put("methodType", "serialCommit"); Map req = new HashMap<>(); req.put("recordId", jsonObject.get("groupId")); req.put("groupId", jsonObject.get("groupId")); String jobState = status[RandomUtil.randomInt(0, 6)]; req.put("jobState", jobState); if (Objects.equals(jobState, "success")) { List> split = new ArrayList<>(); List> list = jsonObject.get("list", List.class); list.forEach(e -> { Map map = new HashMap<>(); map.put("applicationid", IdUtil.fastSimpleUUID()); map.put("data", e.get("accountNo")); map.put("searchAgency", Objects.toString(jsonObject.get("searchAgency"))); map.put("result", "0000"); map.put("splitTime", DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN) + "-" + DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN)); split.add(map); }); req.put("serialNumberSplits", split); } else { req.put("errorMsg", status[RandomUtil.randomInt(0, 6)]); } result.put("reqJson", req); return JSONUtil.toJsonStr(result); } public String allAccountCommitTask(Object reqJson) { JSONObject jsonObject = JSONUtil.parseObj(reqJson); Map result = new HashMap<>(); result.put("infoType", "over"); result.put("postType", "python"); result.put("methodType", "allAccountCommit"); Map req = new HashMap<>(); req.put("recordId", jsonObject.get("groupId")); req.put("groupId", jsonObject.get("groupId")); String jobState = status[RandomUtil.randomInt(0, 6)]; req.put("jobState", jobState); if (Objects.equals(jobState, "success")) { List> split = new ArrayList<>(); List> list = jsonObject.get("list", List.class); list.forEach(e -> { Map map = new HashMap<>(); map.put("applicationid", IdUtil.fastSimpleUUID()); map.put("data", e.get("accountNo")); map.put("searchAgency", Objects.toString(jsonObject.get("searchAgency"))); map.put("peopleName", e.get("peopleName")); map.put("result", "0000"); map.put("accountSearchType", e.get("accountSearchType")); map.put("splitTime", DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN) + "-" + DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN)); split.add(map); }); req.put("allAccountSplits", split); } else { req.put("errorMsg", status[RandomUtil.randomInt(0, 6)]); } result.put("reqJson", req); return JSONUtil.toJsonStr(result); } public String bankAllAccountCommitTask(Object reqJson) { JSONObject jsonObject = JSONUtil.parseObj(reqJson); Map result = new HashMap<>(); result.put("infoType", "over"); result.put("postType", "python"); result.put("methodType", "bankAllAccountCommit"); Map req = new HashMap<>(); req.put("recordId", jsonObject.get("groupId")); req.put("groupId", jsonObject.get("groupId")); String jobState = status[RandomUtil.randomInt(0, 6)]; req.put("jobState", jobState); if (Objects.equals(jobState, "success")) { List> split = new ArrayList<>(); List> list = jsonObject.get("list", List.class); list.forEach(e -> { Map map = new HashMap<>(); map.put("applicationid", IdUtil.fastSimpleUUID()); map.put("result", "0000"); map.put("maninBodyType", e.get("maninBodyType")); map.put("accountNo", e.get("accountNo")); map.put("accountName", e.get("accountName")); map.put("bankName", Objects.toString(jsonObject.get("bankname"))); map.put("splitTime", DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN) + "-" + DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN)); split.add(map); }); req.put("bankAllAccountSplits", split); } else { req.put("errorMsg", status[RandomUtil.randomInt(0, 6)]); } result.put("reqJson", req); return JSONUtil.toJsonStr(result); } /** * 第三方主体 提交over接口 * @param reqJson * @return */ public String thirdSubjectCommitTask(Object reqJson) { JSONObject jsonObject = JSONUtil.parseObj(reqJson); Map result = new HashMap<>(); result.put("infoType", "over"); result.put("postType", "python"); result.put("methodType", "thirdSubjectCommit"); Map req = new HashMap<>(); req.put("recordId", jsonObject.get("groupId")); req.put("groupId", jsonObject.get("groupId")); String jobState = status[RandomUtil.randomInt(0, 6)]; if (Objects.equals(jobState, "success")) { req.put("jobState", jobState); List> split = new ArrayList<>(); List> list = jsonObject.get("list", List.class); list.forEach(e -> { Map map = new HashMap<>(); map.put("applicationid", IdUtil.fastSimpleUUID()); map.put("data", e.get("accountNo")); map.put("searchAgency", Objects.toString(jsonObject.get("searchAgency"))); map.put("result", "0000"); map.put("accountSearchType", e.get("accountSearchType")); split.add(map); }); req.put("thirdSubjectSplits", split); } else { req.put("errorMsg", status[RandomUtil.randomInt(0, 6)]); } result.put("reqJson", req); return JSONUtil.toJsonStr(result); } /** * 回捞任务 * * @param bean * @return */ public String searchTask(WebsocketInfo bean) { String result = ""; String methodType = bean.getMethodType(); if (methodType == null || methodType.equals("")) { return result; } Object reqJson = bean.getReqJson(); switch (methodType) { case "bankResult": result = bankResultTask(reqJson); break; case "thirdResult": result = thirdResultTask(reqJson); break; case "serialResult": result = serialResultTask(reqJson); break; case "allAccountResult": result = allAccountResultTask(reqJson); break; case "bankAllAccountResult": result = bankAllAccountResultTask(reqJson); break; case "thirdOwnerResult": result = thirdSubjectResultTask(reqJson); break; default: break; } return result; } public String bankResultTask(Object reqJson) { JSONObject jsonObject = JSONUtil.parseObj(reqJson); JSONObject param = jsonObject.get("params", JSONObject.class); Map result = new HashMap<>(); result.put("infoType", "result"); result.put("postType", "python"); result.put("methodType", "bankResult"); Map req = new HashMap<>(); req.put("applicationId", param.get("applicationid")); String splitResult = SPLIT_RESULT[RandomUtil.randomInt(0, 10)]; req.put("status", splitResult); if (Objects.equals(splitResult, "机构已反馈")) { req.put("valueCount", RandomUtil.randomInt(0, 10000)); result.put("reqJson", req); FileUtil.copy(FileUtil.file("excel/流水文件.xlsx") , FileUtil.file(Objects.toString(param.get("file_path"))) , true); } else { req.put("valueCount", 0); result.put("reqJson", req); FileUtil.copy(FileUtil.file("excel/流水空文件.xlsx") , FileUtil.file(Objects.toString(param.get("file_path"))) , true); } return JSONUtil.toJsonStr(result); } public String thirdResultTask(Object reqJson) { JSONObject jsonObject = JSONUtil.parseObj(reqJson); JSONObject param = jsonObject.get("params", JSONObject.class); Map result = new HashMap<>(); result.put("infoType", "result"); result.put("postType", "python"); result.put("methodType", "thirdResult"); Map req = new HashMap<>(); req.put("applicationId", param.get("applicationid")); String splitResult = SPLIT_RESULT[RandomUtil.randomInt(0, 10)]; req.put("status", splitResult); if (Objects.equals(splitResult, "机构已反馈")) { req.put("valueCount", RandomUtil.randomInt(0, 10000)); result.put("reqJson", req); FileUtil.copy(FileUtil.file("excel/流水文件.xlsx") , FileUtil.file(Objects.toString(param.get("file_path"))) , true); } else { req.put("valueCount", 0); result.put("reqJson", req); FileUtil.copy(FileUtil.file("excel/流水空文件.xlsx") , FileUtil.file(Objects.toString(param.get("file_path"))) , true); } return JSONUtil.toJsonStr(result); } public String serialResultTask(Object reqJson) { JSONObject jsonObject = JSONUtil.parseObj(reqJson); JSONObject param = jsonObject.get("params", JSONObject.class); Map result = new HashMap<>(); result.put("infoType", "result"); result.put("postType", "python"); result.put("methodType", "serialResult"); Map req = new HashMap<>(); req.put("applicationId", param.get("applicationid")); String splitResult = SPLIT_RESULT[RandomUtil.randomInt(0, 10)]; req.put("status", splitResult); if (Objects.equals(splitResult, "机构已反馈")) { req.put("valueCount", RandomUtil.randomInt(0, 10000)); result.put("reqJson", req); FileUtil.copy(FileUtil.file("excel/流水文件.xlsx") , FileUtil.file(Objects.toString(param.get("file_path"))) , true); } else { req.put("valueCount", 0); result.put("reqJson", req); FileUtil.copy(FileUtil.file("excel/流水空文件.xlsx") , FileUtil.file(Objects.toString(param.get("file_path"))) , true); } return JSONUtil.toJsonStr(result); } public String allAccountResultTask(Object reqJson) { JSONObject jsonObject = JSONUtil.parseObj(reqJson); JSONObject param = jsonObject.get("params", JSONObject.class); Map result = new HashMap<>(); result.put("infoType", "result"); result.put("postType", "python"); result.put("methodType", "allAccountResult"); result.put("combineSearchFlag", "是"); result.put("combineSearchStart", "2025-03-05"); result.put("combineSearchEnd", "2025-05-05"); Map req = new HashMap<>(); req.put("applicationId", param.get("applicationid")); String splitResult = SPLIT_RESULT[RandomUtil.randomInt(0, 10)]; req.put("status", splitResult); if (Objects.equals(splitResult, "机构已反馈")) { req.put("valueCount", RandomUtil.randomInt(0, 10000)); result.put("reqJson", req); FileUtil.copy(FileUtil.file("excel/第三方全账户.xlsx") , FileUtil.file(Objects.toString(param.get("file_path"))) , true); } else { req.put("valueCount", 0); result.put("reqJson", req); FileUtil.copy(FileUtil.file("excel/第三方全账户空文件.xlsx") , FileUtil.file(Objects.toString(param.get("file_path"))) , true); } return JSONUtil.toJsonStr(result); } public String bankAllAccountResultTask(Object reqJson) { JSONObject jsonObject = JSONUtil.parseObj(reqJson); JSONObject param = jsonObject.get("params", JSONObject.class); Map result = new HashMap<>(); result.put("infoType", "result"); result.put("postType", "python"); result.put("methodType", "bankAllAccountResult"); result.put("combineSearchFlag", "是"); result.put("combineSearchStart", "2025-03-05"); result.put("combineSearchEnd", "2025-05-05"); Map req = new HashMap<>(); req.put("applicationId", param.get("applicationid")); String splitResult = SPLIT_RESULT[RandomUtil.randomInt(0, 10)]; req.put("status", splitResult); if (Objects.equals(splitResult, "机构已反馈")) { req.put("valueCount", RandomUtil.randomInt(0, 10000)); result.put("reqJson", req); FileUtil.copy(FileUtil.file("excel/银行卡全账户.xlsx") , FileUtil.file(Objects.toString(param.get("file_path"))) , true); } else { req.put("valueCount", 0); result.put("reqJson", req); FileUtil.copy(FileUtil.file("excel/银行卡全账户空文件.xlsx") , FileUtil.file(Objects.toString(param.get("file_path"))) , true); } return JSONUtil.toJsonStr(result); } /** * 第三方主体 回捞结果 数据 * @param reqJson * @return */ public String thirdSubjectResultTask(Object reqJson){ String thirdSubjectResult=" {\n" + " \n" + " \"applicationid\":\"0303A2002331253012019FZ2505151353210\",\n" + " \"result\":\"0000\",\n" + " \n" + " \"datatype\":\"01\",\n" + " \"data\":\"Cl19850404(085e9858e9a060738bd691107@wx.tenpay.com)\",\n" + " \"subjecttype\":\"01\",\n" + " \"accountownername\":\"陈林\",\n" + " \"accountowneridtype\":\"01\",\n" + " \"accountownerid\":\"320922198504045025\",\n" + " \"credentialvalidity\":\"20160405-20360405\",\n" + " \"telnumber\":\"15190380742\",\n" + " \"bindingdatatype\":\"03\",\n" + " \"bindingdata\":\"Cl19850404\",\n" + " \"bankcard\":[\n" + " {\n" + " \"applicationid\":\"0303A2002331253012019FZ2505151353210\",\n" + " \"bankid\":\"2702\",\n" + " \"bankname\":\"江苏农商联合银行\",\n" + " \"bankaccount\":\"6230661635027269745\",\n" + " \"cardtype\":\"1\",\n" + " \"cardvalidation\":\"1\",\n" + " \"cardexpirydate\":\"-\",\n" + " \"cardinfo\":\"-\",\n" + " \"txcode\":null,\n" + " \"pk\":\"0303A2002331253012019FZ2505151353210\"\n" + " },\n" + " {\n" + "\n" + " \"applicationid\":\"1111\",\n" + " \"bankid\":\"1111\",\n" + " \"bankname\":\"1111银行\",\n" + " \"bankaccount\":\"111111111115\",\n" + " \"cardtype\":\"2\",\n" + " \"cardvalidation\":\"2\",\n" + " \"cardexpirydate\":\"-\",\n" + " \"cardinfo\":\"-\",\n" + " \"txcode\":null,\n" + " \"pk\":\"0303A2002331253012019FZ2505151353210\"\n" + " }\n" + " ]\n" + " }"; JSONObject jsonObject = JSONUtil.parseObj(reqJson); JSONObject param = jsonObject.get("params", JSONObject.class); Map result = new HashMap<>(); result.put("infoType", "result"); result.put("postType", "python"); result.put("methodType", "thirdOwnerResult"); Map req = new HashMap<>(); req.put("applicationId", param.get("applicationid")); req.put("accountSearchType",param.get("accountSearchType")); String status = SPLIT_RESULT[RandomUtil.randomInt(0, 10)]; if (Objects.equals(status, "机构已反馈")) { req.put("status", status); req.put("valueCount", RandomUtil.randomInt(0, 10000)); JSONObject thirdSubject=JSONUtil.parseObj(thirdSubjectResult); thirdSubject.put("applicationid", param.get("applicationid")); thirdSubject.put("data",param.get("data")); req.put("thirdSubjectResult",thirdSubject); result.put("reqJson", req); } else { req.put("status", status); req.put("valueCount", 0); req.put("thirdSubjectResult",""); result.put("reqJson", req); } System.out.println(result); return JSONUtil.toJsonStr(result); } public static void main(String[] args) { FileUtil.copy(FileUtil.file("excel/6226890438342486.xlsx") , FileUtil.file("C:\\Users\\EDY\\Desktop\\需求\\银行卡查询\\test.xlsx") , true); } public String alarmWork(WebsocketInfo bean) { String methodType = bean.getMethodType(); if (methodType == null || methodType.equals("")) { return ""; } Object reqJson = bean.getReqJson(); JSONObject jsonObject = JSONUtil.parseObj(reqJson); Map result = new HashMap<>(); result.put("infoType", "alarmData"); result.put("postType", "python"); result.put("methodType", "bankCommit"); Map req = new HashMap<>(); req.put("recordId", jsonObject.get("groupId")); req.put("groupId", jsonObject.get("groupId")); req.put("jobState", status[RandomUtil.randomInt(0, 6)]); // List> split = new ArrayList<>(); // List> list = jsonObject.get("list", List.class); // list.forEach(e -> { // Map map = new HashMap<>(); // map.put("applicationid", IdUtil.fastSimpleUUID()); // map.put("bankCard", e.get("bankCard")); // map.put("result", "0000"); // map.put("maninBodyType", e.get("maninBodyType")); // map.put("bankName", Objects.toString(jsonObject.get("bankname"))); // map.put("splitTime", DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN) + "-" // + DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN)); // split.add(map); // }); // req.put("bankSplits", split); // result.put("reqJson", req); return JSONUtil.toJsonStr(result); } }