Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chuanshan_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
chuanshan_gov_platform
Commits
632f4e93
Commit
632f4e93
authored
Sep 06, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单事项,辅助接件事项材料列表查询方法subList优化;材料附件下载到本地以及转换预览图片方法修改
parent
f8b08c82
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
single-matter/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterDatumFileServiceImpl.java
...odule/matter/service/impl/MatterDatumFileServiceImpl.java
+8
-14
No files found.
single-matter/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterDatumFileServiceImpl.java
View file @
632f4e93
...
@@ -3,6 +3,7 @@ import cn.hutool.core.io.FileUtil;
...
@@ -3,6 +3,7 @@ import cn.hutool.core.io.FileUtil;
import
cn.hutool.core.util.RandomUtil
;
import
cn.hutool.core.util.RandomUtil
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.xhx.common.utils.HttpDownloadUtil
;
import
com.mortals.xhx.common.utils.HttpDownloadUtil
;
import
com.mortals.xhx.common.utils.StringUtils
;
import
com.mortals.xhx.common.utils.WordUtil
;
import
com.mortals.xhx.common.utils.WordUtil
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -44,20 +45,13 @@ public class MatterDatumFileServiceImpl extends AbstractCRUDServiceImpl<MatterDa
...
@@ -44,20 +45,13 @@ public class MatterDatumFileServiceImpl extends AbstractCRUDServiceImpl<MatterDa
@Override
@Override
protected
void
saveBefore
(
MatterDatumFileEntity
entity
,
com
.
mortals
.
framework
.
model
.
Context
context
)
throws
AppException
{
protected
void
saveBefore
(
MatterDatumFileEntity
entity
,
com
.
mortals
.
framework
.
model
.
Context
context
)
throws
AppException
{
this
.
validData
(
entity
,
context
);
this
.
validData
(
entity
,
context
);
if
(
StringUtils
.
isNotEmpty
(
entity
.
getLocalFileUrl
())){
String
rootPath
=
this
.
filePath
.
endsWith
(
"/"
)
?
this
.
filePath
:
this
.
filePath
+
"/"
;
String
rootPath
=
this
.
filePath
.
endsWith
(
"/"
)
?
this
.
filePath
:
this
.
filePath
+
"/"
;
String
prePath
=
"file/preview/"
;
String
prePath
=
"file/preview/"
;
String
savePath
=
entity
.
getLocalFileUrl
();
String
savePath
=
entity
.
getLocalFileUrl
();
String
newName
=
genPreviewPath
(
rootPath
,
prePath
,
savePath
);
String
newName
=
genPreviewPath
(
rootPath
,
prePath
,
savePath
);
entity
.
setPreviewUrl
(
prePath
+
newName
);
entity
.
setPreviewUrl
(
prePath
+
newName
);
}
}
protected
void
updateBefore
(
MatterDatumFileEntity
entity
,
com
.
mortals
.
framework
.
model
.
Context
context
)
throws
AppException
{
this
.
validData
(
entity
,
context
);
String
rootPath
=
this
.
filePath
.
endsWith
(
"/"
)
?
this
.
filePath
:
this
.
filePath
+
"/"
;
String
prePath
=
"file/preview/"
;
String
savePath
=
entity
.
getLocalFileUrl
();
String
newName
=
genPreviewPath
(
rootPath
,
prePath
,
savePath
);
entity
.
setPreviewUrl
(
prePath
+
newName
);
}
}
private
String
genPreviewPath
(
String
rootPath
,
String
prePath
,
String
tempPath
)
{
private
String
genPreviewPath
(
String
rootPath
,
String
prePath
,
String
tempPath
)
{
...
...
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