From 923550235e401caa17a010737c7c9c96222195d3 Mon Sep 17 00:00:00 2001
From: 刘小明 <liuxm_a@163.com>
Date: 星期六, 28 十二月 2024 10:02:44 +0800
Subject: [PATCH] 修改日志文件存储名称
---
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/dyFile/FileOperate.java | 38 ++++++++++++++++++++++++++++++++++----
1 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/dyFile/FileOperate.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/dyFile/FileOperate.java
index c9774c6..c30a98e 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/dyFile/FileOperate.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/dyFile/FileOperate.java
@@ -124,10 +124,10 @@
rvo = this.restCreateFileName(fmUrl, fileExtName) ;
if(rvo != null){
String relativeFilePath = this.restSaveFile(fileCtrlRqMp, fileMethodMp, file, regionNum, json, rvo);
- //log.info("瀛樺偍鏂囦欢鐢熸垚鏂囦欢璺緞锛�" + relativeFilePath);
- if(relativeFilePath != null){
- rvo.createFilePath(relativeFilePath, rvo.fileNameHash);
- }
+ rvo.fileWebPath = relativeFilePath ;
+ //if(relativeFilePath != null){
+ // rvo.createFilePath(relativeFilePath, rvo.fileNameHash);
+ //}
}
}
return rvo ;
@@ -276,6 +276,36 @@
return rvo ;
}
+
+ /**
+ * 瑙f瀽鏂囦欢鍝堝笇鍊�
+ * @param fmUrl
+ * @param hashCodes
+ * @return
+ */
+ public List<FileRestVo> parseHashcode(String fmUrl, List<Integer> hashCodes){
+ List<FileRestVo> rList = null ;
+ if(hashCodes != null && hashCodes.size() > 0) {
+ // 鍑嗗璇锋眰鏁版嵁
+ MultiValueMap<String, Object> multipartRequestData = new LinkedMultiValueMap<>();
+ multipartRequestData.add(FileConstant.fmPostMapping_parseHashcodeList_paramName, hashCodes);
+
+ // 璁剧疆璇锋眰澶撮儴锛岃繖閲屽亣璁炬湇鍔″櫒鎺ユ敹multipart/form-data绫诲瀷鐨勬暟鎹�
+ HttpHeaders headers = new HttpHeaders();
+ headers.setContentType(MediaType.MULTIPART_FORM_DATA);
+
+ // 灏佽璇锋眰浣�
+ HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(multipartRequestData, headers);
+
+ String webUrl = fmUrl + "/" + FileConstant.fmRequestMapping + "/" + FileConstant.fmPostMapping_parseHashcodeList;
+ // 鍙戦�丳OST璇锋眰
+ FileRestVo[] rvos = restTemplate.postForObject(webUrl, requestEntity, FileRestVo[].class);
+ rList = Arrays.asList(rvos) ;
+ }
+ return rList ;
+ }
+
+
/**
* 瑙f瀽鏂囦欢鏂囦欢璺緞涓殑鍝堝笇鍊煎苟杩斿洖鍥剧墖瀹屾暣璺緞
* @param fmUrl
--
Gitblit v1.8.0