Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sfw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨郁彬
sfw
Commits
b187a900
Commit
b187a900
authored
Apr 07, 2024
by
杨郁彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jm文件路径替换
parent
1b6c162c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
AttachmentServiceImpl.java
...up/bdc/attachment/service/impl/AttachmentServiceImpl.java
+1
-1
CisService.java
src/main/java/com/cesgroup/bdc/cis/service/CisService.java
+2
-2
No files found.
src/main/java/com/cesgroup/bdc/attachment/service/impl/AttachmentServiceImpl.java
View file @
b187a900
...
@@ -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
;
}
}
...
...
src/main/java/com/cesgroup/bdc/cis/service/CisService.java
View file @
b187a900
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment