From d5449236ef0b3adafb3e4cc872f50479efa0ce7b Mon Sep 17 00:00:00 2001 From: zhangc <zc@123> Date: 星期二, 11 三月 2025 16:10:29 +0800 Subject: [PATCH] 配置信息 --- src/main/java/com/zy/asrs/utils/PostMesDataUtils.java | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/zy/asrs/utils/PostMesDataUtils.java b/src/main/java/com/zy/asrs/utils/PostMesDataUtils.java index 04cc0db..baa3658 100644 --- a/src/main/java/com/zy/asrs/utils/PostMesDataUtils.java +++ b/src/main/java/com/zy/asrs/utils/PostMesDataUtils.java @@ -2,7 +2,6 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import com.core.common.SpringUtils; import com.core.exception.CoolException; import com.zy.asrs.task.AbstractHandler; import com.zy.asrs.task.core.ReturnT; @@ -15,16 +14,16 @@ /* - * url: eg: 192.168.4.15:1433 - * path: eg: api/InterFace/get_InterFace_TestStorage - * combParam:鍙傛暟 - * */ - public ReturnT<String> postMesData(String name,String URL,String mesPath, Object combParam){ + * url: eg: 192.168.4.15:1433 + * path: eg: api/InterFace/get_InterFace_TestStorage + * combParam:鍙傛暟 + * */ + public ReturnT<String> postMesData(String name, String URL, String mesPath, Object combParam) { // if (true){ // System.out.println("name:"+name+",URL:"+URL+",mesPath:"+mesPath+",combParam:"+combParam); // return SUCCESS; // } - if(combParam != null){ + if (combParam != null) { String response = ""; boolean success = false; try { @@ -37,24 +36,25 @@ .setJson(JSON.toJSONString(combParam)) .build() .doPost(); - System.out.println("response:"+response); + System.out.println("response:" + response); JSONObject jsonObject = JSON.parseObject(response); if (jsonObject.getInteger("code").equals(200)) { success = true; } else { - log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", URL+"/"+mesPath, JSON.toJSONString(combParam), response); - throw new CoolException("涓婃姤"+name); + log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", URL + "/" + mesPath, JSON.toJSONString(combParam), response); + throw new CoolException("涓婃姤" + name); } } catch (Exception e) { - log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", URL+"/"+mesPath, JSON.toJSONString(combParam), response); + log.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", URL + "/" + mesPath, JSON.toJSONString(combParam), response); // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); return FAIL.setMsg(e.getMessage()); } finally { try { } catch (Exception e) { - log.error("", e); } + log.error("", e); + } } } return SUCCESS; -- Gitblit v1.9.1