Commit b187a900 authored by 杨郁彬's avatar 杨郁彬

jm文件路径替换

parent 1b6c162c
...@@ -523,7 +523,7 @@ public class AttachmentServiceImpl extends ServiceImpl<AttachmentMapper, Attachm ...@@ -523,7 +523,7 @@ public class AttachmentServiceImpl extends ServiceImpl<AttachmentMapper, Attachm
public String getEncryptedPath(String plainPath){ public String getEncryptedPath(String plainPath){
File rootPath = new File(fileBasePath); File rootPath = new File(fileBasePath);
String rootAbsoulutePath = rootPath.getAbsolutePath(); String rootAbsoulutePath = rootPath.getAbsolutePath();
String encryptedPath = plainPath.replace(rootAbsoulutePath,rootAbsoulutePath+File.separator+"jmdir"); String encryptedPath = plainPath.replace(rootAbsoulutePath,rootAbsoulutePath+"Jm");
return encryptedPath; return encryptedPath;
} }
......
...@@ -45,7 +45,7 @@ public class CisService extends ServiceImpl<CisMapper, CisDealResult> { ...@@ -45,7 +45,7 @@ public class CisService extends ServiceImpl<CisMapper, CisDealResult> {
File rootPath = new File(fileBasePath); File rootPath = new File(fileBasePath);
String rootAbsoulutePath = rootPath.getAbsolutePath(); String rootAbsoulutePath = rootPath.getAbsolutePath();
String plainPath = plainFile.getAbsolutePath(); String plainPath = plainFile.getAbsolutePath();
String encryptedPath = plainPath.replace(rootAbsoulutePath,rootAbsoulutePath+File.separator+"jmdir"); String encryptedPath = plainPath.replace(rootAbsoulutePath,rootAbsoulutePath+"Jm");
//String ext = plainPath.substring(plainPath.lastIndexOf('.')); //String ext = plainPath.substring(plainPath.lastIndexOf('.'));
//String encryptedPath = plainPath.substring(0,plainPath.lastIndexOf('.')) + "_m" + ext; //String encryptedPath = plainPath.substring(0,plainPath.lastIndexOf('.')) + "_m" + ext;
CipherAPI cipherAPI = ApplicationContextUtils.getBean(CipherAPI.class); CipherAPI cipherAPI = ApplicationContextUtils.getBean(CipherAPI.class);
...@@ -84,7 +84,7 @@ public class CisService extends ServiceImpl<CisMapper, CisDealResult> { ...@@ -84,7 +84,7 @@ public class CisService extends ServiceImpl<CisMapper, CisDealResult> {
File rootPath = new File(fileBasePath); File rootPath = new File(fileBasePath);
String rootAbsoulutePath = rootPath.getAbsolutePath(); String rootAbsoulutePath = rootPath.getAbsolutePath();
String encrytedPath = encrytedFile.getAbsolutePath(); String encrytedPath = encrytedFile.getAbsolutePath();
String plainPath = encrytedPath.replace(rootAbsoulutePath+File.separator+"jmdir",rootAbsoulutePath); String plainPath = encrytedPath.replace(rootAbsoulutePath+"Jm",rootAbsoulutePath);
CipherAPI cipherAPI = ApplicationContextUtils.getBean(CipherAPI.class); CipherAPI cipherAPI = ApplicationContextUtils.getBean(CipherAPI.class);
try { try {
File decryptedFile = new File(plainPath); File decryptedFile = new File(plainPath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment