diff --git a/src/main/java/com/glxp/api/upload/uploadController.java b/src/main/java/com/glxp/api/upload/uploadController.java index 2439774e7..a4dce48ca 100644 --- a/src/main/java/com/glxp/api/upload/uploadController.java +++ b/src/main/java/com/glxp/api/upload/uploadController.java @@ -25,6 +25,10 @@ public class uploadController { @Value("${file_path}") private String filePath; + @Value("${file_url}") + private String fileUrl; + @Value("${file_lpath}") + private String fileLpath; /** * 上传PDF模板 @@ -117,6 +121,7 @@ public class uploadController { } String newName = UUID.randomUUID() + fileType;//生成新文件名 String savePath = filePath + "/register/" + type; + String savePath1 = fileLpath + "?type=" + type; File file1 = new File(savePath); if (!file1.exists()) {// 判断目录是否存在 @@ -127,7 +132,7 @@ public class uploadController { file.transferTo(file1); Map rMap = new HashMap<>(); rMap.put("msg", "上传成功"); - rMap.put("name", newName); + rMap.put("name", fileUrl + savePath1 + "&name=" + newName); rMap.put("type", type); return ResultVOUtils.success(rMap); } catch (IOException e) { diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index d6d7df54e..f163b1a75 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -4,9 +4,9 @@ server: spring: datasource: driver-class-name: com.p6spy.engine.spy.P6SpyDriver - jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + jdbc-url: jdbc:p6spy:mysql://192.168.0.66:3364/udi_wms_0710?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true username: root - password: 123456 + password: Glxp@6066 hikari: connection-timeout: 60000 maximum-pool-size: 20 @@ -47,6 +47,8 @@ logging: com.glxp.api.dao: debug file_path: D:/udi/udiwms/udiwmsfile/ +file_lpath: /udiwms/image/register/file/getImage +file_url: http://127.0.0.1:9991 UDI_KEY: 6b137c66-6286-46c6-8efa-c2f5dd9237df UDI_SERVER_URL: https://www.udims.com/UDI_DL_Server_test SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs @@ -55,5 +57,4 @@ back_file_path: D:/share/udisps/back/ API_KEY: 1101 API_SECRET: zBITspLNvuoEd4FaamlSoqxRHmNsmQ6L WEB_TITLE: 平潭协和医院 - SPMS_WEBSOCKET_TOKEN: 07rKFDFkQvBkbxgc7aUBlONo4gWNdx8b