From ddefa6dc2532bf0a405d216a8fa8e2a4bb0bf96f Mon Sep 17 00:00:00 2001
From: jiazx0107@163.com <jiazx0107@163.com>
Date: 星期六, 18 十一月 2023 14:17:42 +0800
Subject: [PATCH] 增加HTTP地磅协议实现
---
src/main/java/com/fzzy/gateway/hx2023/service/HxGatewayRemoteServiceImpl.java | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/fzzy/gateway/hx2023/service/HxGatewayRemoteServiceImpl.java b/src/main/java/com/fzzy/gateway/hx2023/service/HxGatewayRemoteServiceImpl.java
index c5c8362..13c0715 100644
--- a/src/main/java/com/fzzy/gateway/hx2023/service/HxGatewayRemoteServiceImpl.java
+++ b/src/main/java/com/fzzy/gateway/hx2023/service/HxGatewayRemoteServiceImpl.java
@@ -4,6 +4,7 @@
import com.fzzy.api.data.PushProtocol;
import com.fzzy.api.utils.*;
import com.fzzy.api.view.repository.ApiLogRep;
+import com.fzzy.gateway.data.BaseResp;
import com.fzzy.gateway.service.GatewayConfService;
import com.fzzy.gateway.util.GatewayHttpUtil;
import com.fzzy.gateway.api.GatewayRemoteService;
@@ -61,7 +62,7 @@
CloudResp respKey = JSONObject.parseObject(jsonStr, CloudResp.class);
- if (ScConstant.CODE_200 == respKey.getCode()) {
+ if (BaseResp.CODE_200 == respKey.getCode()) {
JSONObject object = respKey.getData();
String pubKey = (String) object.get("pubKey");
String priKey = (String) object.get("priKey");
@@ -79,7 +80,7 @@
log.info("---鑾峰彇AccessToken鎺ュ彛-杩斿洖---{}", jsonStr);
CloudResp respToken = JSONObject.parseObject(jsonStr, CloudResp.class);
- if (ScConstant.CODE_200 == respToken.getCode()) {
+ if (BaseResp.CODE_200 == respToken.getCode()) {
JSONObject object = respKey.getData();
if (null != object) {
String token = (String) object.get("token");
@@ -119,7 +120,7 @@
String url = gatewayConf.getApiUrl() + "reserver/api/iot/equipment/heartbeat";
String jsonStr = GatewayHttpUtil.doGet(url, params);
- log.info("---缃戝叧蹇冭烦鎺ュ彛-杩斿洖---{}", jsonStr);
+ // log.info("---缃戝叧蹇冭烦鎺ュ彛-杩斿洖---{}", jsonStr);
} catch (Exception e) {
log.error("------缃戝叧蹇冭烦鎺ュ彛--鎵ц澶辫触-----{}", e);
--
Gitblit v1.9.3