bihuisong 1 jaar geleden
bovenliggende
commit
19104a95f3

+ 6 - 1
pom.xml

@@ -142,7 +142,12 @@
             <artifactId>hutool-all</artifactId>
             <version>5.8.2</version>
         </dependency>
-
+        <!-- 系统接口 -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>sooka-sponest-api-system</artifactId>
+            <version>${ruoyi.version}</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 5 - 2
src/main/java/com/sooka/sponest/dataexchange/exchange/controller/ExchangeController.java

@@ -3,6 +3,7 @@ package com.sooka.sponest.dataexchange.exchange.controller;
 
 import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.utils.file.FilePrefixUtils;
+import com.ruoyi.system.api.RemoteConfigService;
 import com.ruoyi.system.api.RemoteFileService;
 import com.ruoyi.system.api.domain.SysFile;
 import com.sooka.sponest.dataexchange.util.spring.SpringUtils;
@@ -36,10 +37,11 @@ public class ExchangeController {
     private RemoteAuthBaseService remoteAuthBaseService;
     @Resource
     private RemoteEventBaseService remoteEventBaseService;
+    @Resource
+    private RemoteConfigService remoteConfigService;
 
     @Value("${}")
     private String url;
-    private final String pictureUrl = "http://116.142.80.13:8081/";
 
     /**
      * 获取秘钥接口
@@ -101,9 +103,10 @@ public class ExchangeController {
     @PostMapping("/receiveEventData")
     @ResponseBody
     public R<?> pushData(@RequestBody DataExchangeEntity dataExchangeEntity) {
+        R<String> appUrl = remoteConfigService.remotegetConfigKey("appUrl");
         List<String> pictureList = new ArrayList<>();
         for (String picture : dataExchangeEntity.getEventPicture()) {
-            pictureList.add(pictureUrl + picture);
+            pictureList.add(appUrl.getData().toString() + picture);
         }
         dataExchangeEntity.setEventPicture(pictureList);
         // TODO: 2024/1/9 0009 待修改