diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index 857d3226..54e09203 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -544,14 +544,14 @@ public class ResourceServiceImpl extends CrudServiceImpl result_ = new CopyOnWriteArrayList<>(); CompletableFuture cloud = CompletableFuture.runAsync(() -> { // 云脑专网 - String url = String.format(tsingtao_xhaProperties.getCloudcam(), "", 1, 10); + String url = tsingtao_xhaProperties.getCloudcam(); logger.info(url); Request request = new Request.Builder().url(url).build(); try (Response response = client.newCall(request).execute()) { if (response.isSuccessful()) { JSONObject jsonObject = JSON.parseObject(response.body().string()); - if (jsonObject.containsKey("data")) { - result_.add(jsonObject.getJSONObject("data").getLongValue("total")); + if (jsonObject.containsKey("errorNo") && jsonObject.getLongValue("errorNo") == 200) { + result_.add(jsonObject.getLongValue("body")); } } else { logger.error("青岛西海岸获取失败"); @@ -562,14 +562,17 @@ public class ResourceServiceImpl extends CrudServiceImpl { // 金宏网 - String url = String.format(tsingtao_xhaProperties.getLocalcam(), "", 1, 10); + String url = tsingtao_xhaProperties.getLocalcam(); logger.info(url); Request request = new Request.Builder().url(url).build(); try (Response response = client.newCall(request).execute()) { if (response.isSuccessful()) { JSONObject jsonObject = JSON.parseObject(response.body().string()); - if (jsonObject.containsKey("data")) { - result_.add(jsonObject.getJSONObject("data").getLongValue("total")); + //if (jsonObject.containsKey("data")) { + // result_.add(jsonObject.getJSONObject("data").getLongValue("total")); + //} + if (jsonObject.containsKey("errorNo") && jsonObject.getLongValue("errorNo") == 200) { + result_.add(jsonObject.getLongValue("body")); } } else { logger.error("青岛西海岸获取失败"); diff --git a/renren-admin/src/main/resources/domain/tsingtao-xha.properties b/renren-admin/src/main/resources/domain/tsingtao-xha.properties index 92eb821d..5ddad40a 100644 --- a/renren-admin/src/main/resources/domain/tsingtao-xha.properties +++ b/renren-admin/src/main/resources/domain/tsingtao-xha.properties @@ -1,7 +1,7 @@ tsingtao-xha.cloudhls=http://10.10.30.9:8001/hx-weather-warning/camera/getCameraLiveStreamByCode?cameraCode=%s&protocol=hls tsingtao-xha.localhls=http://10.134.135.9:8001/hx-weather-warning/camera/getCameraLiveStreamByCode?cameraCode=%s&protocol=hls -tsingtao-xha.cloudcam=http://10.10.30.9:8001/hx-weather-warning/camera/getCameraListByName?name=%s&pageNo=%d&pageSize=%d -tsingtao-xha.localcam=http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=%s&pageNo=%d&pageSize=%d +tsingtao-xha.cloudcam=http://10.10.30.9:8001/data_service/getCamera/getCameraCount +tsingtao-xha.localcam=http://10.134.135.9:8001/data_service/getCamera/getCameraCount tsingtao-xha.resourcecount=http://10.10.30.24:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=&type=&orderField=requestNum&orderType=desc&pageNum=1&pageSize=10&serviceType=data&rq=1655106309671.43 tsingtao-xha.resourceapplyinfo=http://10.10.30.24:30058/share-portal/platform/index/abilityMarket/count tsingtao-xha.sjzy=http://10.10.30.24:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=%s&type=&orderField=%s&orderType=%s&pageNum=%s&pageSize=%s&serviceType=data&rq=1655106309671.43 \ No newline at end of file