From ea58523b67ad59002a1191c3c564258c5b81f6f2 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 06 五月 2025 17:35:16 +0800
Subject: [PATCH] Revert "1、实现万用token(0000-0000-1234-9876-5); 2、web端单独实现命令结果等待器,并修改相关部分; 3、web端实现透传命令; 4、修改一些不当注释; 5、优化一些代码。"
---
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java
index a066651..646d9be 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/command/ComSupport.java
@@ -66,6 +66,10 @@
protected String commandTypeOuter = CommandType.outerCommand;
+ // 瀛樺偍瀹炰緥鍖栫殑 CompletableFuture<Data> 瀵硅薄
+ protected static Map<Long, Object> features = new HashMap<>();
+ //protected static Boolean setuped = false;
+
@Autowired
private RestTemplate restTemplate;
@@ -208,19 +212,19 @@
*/
protected BaseResponse<Data> dealWithCallBack(Long comId, Command com) {
CompletableFuture<JSONObject> feature = new CompletableFuture<>();
- ComResultWait.put(comId, feature);
+ features.put(comId, feature);
try {
// 鍙戦�佸懡浠�
JSONObject response_SendCom = (JSONObject) JSON.toJSON(sendCom2Mw(com));
if (response_SendCom == null || !response_SendCom.getString("code").equals("0001")) {
// 璇锋眰澶辫触锛孯TU鏈笂绾匡紝娓呴櫎feature
- ComResultWait.remove(comId);
+ features.remove(comId);
JSONObject job_param = response_SendCom.getJSONObject("content").getJSONObject("param");
return BaseResponseUtils.buildErrorMsg(job_param.getString("message"));
}
JSONObject resultData = feature.get(180, TimeUnit.SECONDS);
- ComResultWait.remove(comId);
+ features.remove(comId);
Long commandId = resultData.getLong("commandId");
if (commandId.equals(comId)) {
--
Gitblit v1.8.0