From b34f41fe5d510df413077ff9c5846955843f9e94 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 25 十二月 2024 12:02:48 +0800 Subject: [PATCH] 修改bug --- guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/videoGateway/VideoGateway.java | 38 ++++++++++++++++++++------------------ 1 files changed, 20 insertions(+), 18 deletions(-) diff --git a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/videoGateway/VideoGateway.java b/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/videoGateway/VideoGateway.java index 5f74528..198ae88 100644 --- a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/videoGateway/VideoGateway.java +++ b/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/videoGateway/VideoGateway.java @@ -36,10 +36,10 @@ public static SessionId getSessionId(){ HttpRequest get = HttpUtil.createGet("https://zhyn.cg.gz.gov.cn/api/cws-auth/v1/session-id/third-platform"); get.header("operate-terminal", "4"); - log.info("请求参数:" + get); + log.info("【获取 SessionId】请求参数:" + get); HttpResponse execute = get.execute(); String body = execute.body(); - log.info("返回结果:" + body); + log.info("【获取 SessionId】返回结果:" + body); JSONObject result = JSON.parseObject(body); Integer code = result.getInteger("code"); if(-1 == code){ @@ -70,10 +70,10 @@ String encryptHex = sm4.encryptHex("Lti52D@#&J6q"); body.put("pwd", encryptHex); body.put("sessionId", sessionId.getSessionId()); - log.info("请求参数:" + JSON.toJSONString(body) + "\npublicKey:" + sessionId.getPublicKey() + "\n加密key:" + sessionId.getKey()); + log.info("【登录】请求参数:" + JSON.toJSONString(body) + "\npublicKey:" + sessionId.getPublicKey() + "\n加密key:" + sessionId.getKey()); post.body(JSON.toJSONString(body)); HttpResponse execute = post.execute(); - log.info("返回结果:" + execute.body()); + log.info("【登录】返回结果:" + execute.body()); JSONObject result = JSON.parseObject(execute.body()); Integer code = result.getInteger("code"); if(0 != code){ @@ -108,7 +108,7 @@ if(StringUtils.isNotEmpty(companyName)){ body.put("companyName", companyName); } - log.info("请求参数:" + JSON.toJSONString(body)); + log.info("【获取车辆列表】请求参数:" + JSON.toJSONString(body)); post.body(JSON.toJSONString(body)); HttpResponse execute = post.execute(); if(401 == execute.getStatus()){ @@ -121,7 +121,7 @@ num++; return getVehicleList(vehicleNum, companyId, companyName, num); } - log.info("返回结果:" + execute.body()); + log.info("【获取车辆列表】返回结果:" + execute.body()); JSONObject result = JSON.parseObject(execute.body()); Integer code = result.getInteger("code"); if(0 != code){ @@ -162,7 +162,7 @@ if(StringUtils.isNotEmpty(companyName)){ body.put("companyName", companyName); } - log.info("请求参数:" + JSON.toJSONString(body)); + log.info("【获取船舶列表】请求参数:" + JSON.toJSONString(body)); post.body(JSON.toJSONString(body)); HttpResponse execute = post.execute(); if(401 == execute.getStatus()){ @@ -175,7 +175,7 @@ accountLogin = null; return getShipList(shipNum, companyId, companyName, num); } - log.info("返回结果:" + execute.body()); + log.info("【获取船舶列表】返回结果:" + execute.body()); JSONObject result = JSON.parseObject(execute.body()); Integer code = result.getInteger("code"); if(0 != code){ @@ -204,6 +204,7 @@ post.header("operate-terminal", "4"); post.header("token", accountLogin.getToken()); post.body("{}"); + log.info("【2018年协议车辆在线】请求参数:" + post.getUrl()); HttpResponse execute = post.execute(); if(401 == execute.getStatus()){ log.error("token失效,重新登录"); @@ -215,7 +216,7 @@ accountLogin = null; return queryRuntimeInfoByCache(num); } - log.info("返回结果:" + execute.body()); + log.info("【2018年协议车辆在线】返回结果:" + execute.body()); JSONObject result = JSON.parseObject(execute.body()); Integer code = result.getInteger("code"); if(0 != code){ @@ -243,6 +244,7 @@ HttpRequest get = HttpUtil.createGet("https://zhyn.cg.gz.gov.cn/jttweb/api/v1/location/locationRealTimeInfoCache"); get.header("operate-terminal", "4"); get.header("token", accountLogin.getToken()); + log.info("【2023年协议车辆在线】请求参数:" + get.getUrl()); HttpResponse execute = get.execute(); if(401 == execute.getStatus()){ log.error("token失效,重新登录"); @@ -254,7 +256,7 @@ accountLogin = null; return locationRealTimeInfoCache(num); } - log.info("返回结果:" + execute.body()); + log.info("【2023年协议车辆在线】返回结果:" + execute.body()); JSONObject result = JSON.parseObject(execute.body()); Integer code = result.getInteger("code"); if(0 != code){ @@ -286,7 +288,7 @@ post.header("token", accountLogin.getToken()); Map<String, Object> body = new HashMap<>(); body.put("channelId", channelId); - log.info("请求参数:" + JSON.toJSONString(body)); + log.info("【2018年协议发送拍摄指令接口】请求参数:" + JSON.toJSONString(body)); post.body(JSON.toJSONString(body)); HttpResponse execute = post.execute(); if(401 == execute.getStatus()){ @@ -299,7 +301,7 @@ accountLogin = null; return cameraShot2018(terminalId, channelId, num); } - log.info("返回结果:" + execute.body()); + log.info("【2018年协议发送拍摄指令接口】返回结果:" + execute.body()); JSONObject result = JSON.parseObject(execute.body()); Integer code = result.getInteger("code"); if(0 != code){ @@ -327,7 +329,7 @@ get.header("operate-terminal", "4"); get.header("token", accountLogin.getToken()); Map<String, Object> body = new HashMap<>(); - log.info("请求参数:" + get.getUrl()); + log.info("【2023年协议发送拍摄指令接口】请求参数:" + get.getUrl()); HttpResponse execute = get.execute(); if(401 == execute.getStatus()){ log.error("token失效,重新登录"); @@ -339,7 +341,7 @@ accountLogin = null; return cameraShot2023(vehicleId, vehicleType, terminalId, channelId, num); } - log.info("返回结果:" + execute.body()); + log.info("【2023年协议发送拍摄指令接口】返回结果:" + execute.body()); JSONObject result = JSON.parseObject(execute.body()); Integer code = result.getInteger("code"); if(0 != code){ @@ -364,7 +366,7 @@ HttpRequest get = HttpUtil.createGet("https://zhyn.cg.gz.gov.cn/map/web/vehicleCtrl/getCameraShotById?terminalId=" + terminalId + "&id=" + fileId); get.header("operate-terminal", "4"); get.header("token", accountLogin.getToken()); - log.info("请求参数:" + get.getUrl()); + log.info("【2018年协议车辆获取拍摄图片】请求参数:" + get.getUrl()); HttpResponse execute = get.execute(); if(401 == execute.getStatus()){ log.error("token失效,重新登录"); @@ -376,7 +378,7 @@ accountLogin = null; return getCameraShotByFileId2018(terminalId, fileId, num); } - log.info("返回结果:" + execute.body()); + log.info("【2018年协议车辆获取拍摄图片】返回结果:" + execute.body()); JSONObject result = JSON.parseObject(execute.body()); Integer code = result.getInteger("code"); if(0 != code){ @@ -404,7 +406,7 @@ HttpRequest get = HttpUtil.createGet("https://zhyn.cg.gz.gov.cn/api/cws-business/biz-device-send-records/v1/getCameraShotById?id=" + fileId); get.header("operate-terminal", "4"); get.header("token", accountLogin.getToken()); - log.info("请求参数:" + get.getUrl()); + log.info("【2023年协议车辆获取拍摄图片】请求参数:" + get.getUrl()); HttpResponse execute = get.execute(); if(401 == execute.getStatus()){ log.error("token失效,重新登录"); @@ -416,7 +418,7 @@ accountLogin = null; return getCameraShotByFileId2023(fileId, num); } - log.info("返回结果:" + execute.body()); + log.info("【2023年协议车辆获取拍摄图片】返回结果:" + execute.body()); JSONObject result = JSON.parseObject(execute.body()); Integer code = result.getInteger("code"); if(0 != code){ -- Gitblit v1.7.1