From de75da4b68278b675a77fb79c34cd9339e4da68c Mon Sep 17 00:00:00 2001 From: wangliwen Date: Wed, 22 Jun 2022 19:33:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=84=E5=9C=B0=E9=85=8D=E7=BD=AE=E5=A4=96?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/domain/baotou.properties | 1 + config/domain/tsingtao-xha.properties | 7 +++++++ config/domain/tsingtao.properties | 0 renren-admin/pom.xml | 3 ++- .../renren/common/domain/BaoTouProperties.java | 2 +- .../common/domain/TsingtaoProperties.java | 2 +- .../common/domain/Tsingtao_xhaProperties.java | 2 +- .../resource/controller/ResourceController.java | 17 ++++++++--------- .../src/main/resources/assembly/assembly.xml | 1 + 9 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 config/domain/baotou.properties create mode 100644 config/domain/tsingtao-xha.properties create mode 100644 config/domain/tsingtao.properties diff --git a/config/domain/baotou.properties b/config/domain/baotou.properties new file mode 100644 index 00000000..f59252f2 --- /dev/null +++ b/config/domain/baotou.properties @@ -0,0 +1 @@ +baotou.hlsurl=http://10.110.205.1:18088/server/device/hisdeviceapplylist/url/%s \ No newline at end of file diff --git a/config/domain/tsingtao-xha.properties b/config/domain/tsingtao-xha.properties new file mode 100644 index 00000000..ad5a9cf2 --- /dev/null +++ b/config/domain/tsingtao-xha.properties @@ -0,0 +1,7 @@ +tsingtao-xha.cloudhls=http://10.10.30.9:8001/hx-weatherwarning/camera/getCameraLiveStreamByCode?cameraCode=%s&protocol=hls +tsingtao-xha.localhls=http://10.134.135.9:8001/hx-weatherwarning/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.resourcecount=http://10.16.3.224: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.134.135.24:30058/shareportal/platform/index/abilityMarket/count +tsingtao-xha.sjzy=http://10.16.3.224: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 diff --git a/config/domain/tsingtao.properties b/config/domain/tsingtao.properties new file mode 100644 index 00000000..e69de29b diff --git a/renren-admin/pom.xml b/renren-admin/pom.xml index b44b8cb6..09cc25e3 100644 --- a/renren-admin/pom.xml +++ b/renren-admin/pom.xml @@ -304,7 +304,8 @@ application-prod.yml - + db/*.sql + domain/** diff --git a/renren-admin/src/main/java/io/renren/common/domain/BaoTouProperties.java b/renren-admin/src/main/java/io/renren/common/domain/BaoTouProperties.java index 471b2158..ba42981b 100644 --- a/renren-admin/src/main/java/io/renren/common/domain/BaoTouProperties.java +++ b/renren-admin/src/main/java/io/renren/common/domain/BaoTouProperties.java @@ -12,7 +12,7 @@ import org.springframework.stereotype.Component; */ @Data @Component -@PropertySource("classpath:/domain/baotou.properties") +@PropertySource("file:config/domain/baotou.properties") @ConfigurationProperties(prefix = "baotou") public class BaoTouProperties { private String hlsurl; diff --git a/renren-admin/src/main/java/io/renren/common/domain/TsingtaoProperties.java b/renren-admin/src/main/java/io/renren/common/domain/TsingtaoProperties.java index 7041bcd8..e00d2ff9 100644 --- a/renren-admin/src/main/java/io/renren/common/domain/TsingtaoProperties.java +++ b/renren-admin/src/main/java/io/renren/common/domain/TsingtaoProperties.java @@ -11,7 +11,7 @@ import org.springframework.stereotype.Component; */ @Data @Component -@PropertySource("classpath:/domain/tsingtao.properties") +@PropertySource("file:config/domain/tsingtao.properties") @ConfigurationProperties(prefix = "tsingtao") public class TsingtaoProperties { diff --git a/renren-admin/src/main/java/io/renren/common/domain/Tsingtao_xhaProperties.java b/renren-admin/src/main/java/io/renren/common/domain/Tsingtao_xhaProperties.java index 2fa90cad..deaf2a61 100644 --- a/renren-admin/src/main/java/io/renren/common/domain/Tsingtao_xhaProperties.java +++ b/renren-admin/src/main/java/io/renren/common/domain/Tsingtao_xhaProperties.java @@ -11,7 +11,7 @@ import org.springframework.stereotype.Component; */ @Data @Component -@PropertySource("classpath:/domain/tsingtao-xha.properties") +@PropertySource("file:config/domain/tsingtao-xha.properties") @ConfigurationProperties(prefix = "tsingtao-xha") public class Tsingtao_xhaProperties { private String cloudhls; diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index 858d4988..697be96d 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -318,18 +318,18 @@ public class ResourceController { String parame = "\n" + "\n" + " \n" + - String.format("%d\n %d\n",page, size) + - String.format("%s\n %s\n",pxcol, order); - if (bmname != null){ - parame = parame + String.format("%s",bmname); + String.format("%d\n %d\n", page, size) + + String.format("%s\n %s\n", pxcol, order); + if (bmname != null) { + parame = parame + String.format("%s", bmname); } if (zyname != null) { - parame = parame + String.format("%s",zyname); + parame = parame + String.format("%s", zyname); } parame = parame + ""; HttpHeaders requestHeaders = new HttpHeaders(); requestHeaders.set("SOAPAction", "http://tempuri.org/ZWCJ_mainPort"); - requestHeaders.setContentType(new MediaType("text","xml", Charset.forName("utf-8"))); + requestHeaders.setContentType(new MediaType("text", "xml", Charset.forName("utf-8"))); HttpEntity requestEntity = new HttpEntity(parame, requestHeaders); try { String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody(); @@ -415,15 +415,14 @@ public class ResourceController { } */ - @GetMapping("getHls") - @ApiOperation("获取hls地址") + @GetMapping("/hls/getHls") public Result getHls(String key) { Optional factory = VideoPreviewFactory.build(); if (factory.isPresent()) { String hls = factory.get().getHls(key); return new Result().ok(hls); } - return null; + return new Result().ok(null); } diff --git a/renren-admin/src/main/resources/assembly/assembly.xml b/renren-admin/src/main/resources/assembly/assembly.xml index 060392ef..39204ce6 100644 --- a/renren-admin/src/main/resources/assembly/assembly.xml +++ b/renren-admin/src/main/resources/assembly/assembly.xml @@ -51,6 +51,7 @@ *.properties *.json db/*.sql + domain/** application-prod.yml