Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
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
YZG
yzg-util
Commits
0dbf6a25
Commit
0dbf6a25
authored
Dec 15, 2021
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载视频
parent
c58c5e3e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
YzgFileVo.java
...oud/src/main/java/com/yanzuoguang/cloud/vo/YzgFileVo.java
+1
-1
YzgExcelService.java
...main/java/com/yanzuoguang/cloud/file/YzgExcelService.java
+4
-1
No files found.
yzg-util-cloud/src/main/java/com/yanzuoguang/cloud/vo/YzgFileVo.java
View file @
0dbf6a25
...
@@ -98,7 +98,7 @@ public class YzgFileVo extends BaseVo implements InitDao {
...
@@ -98,7 +98,7 @@ public class YzgFileVo extends BaseVo implements InitDao {
this
.
fileStatus
=
StringHelper
.
getFirst
(
this
.
fileStatus
);
this
.
fileStatus
=
StringHelper
.
getFirst
(
this
.
fileStatus
);
this
.
fileRow
=
StringHelper
.
getFirst
(
this
.
fileRow
);
this
.
fileRow
=
StringHelper
.
getFirst
(
this
.
fileRow
);
this
.
errorMessage
=
StringHelper
.
getFirst
(
this
.
errorMessage
);
this
.
errorMessage
=
StringHelper
.
getFirst
(
this
.
errorMessage
);
this
.
downloadDate
=
StringHelper
.
getFirst
(
this
.
downloadDate
);
this
.
downloadDate
=
StringHelper
.
getFirst
Null
(
this
.
downloadDate
);
this
.
downloadUserId
=
StringHelper
.
getFirst
(
this
.
downloadUserId
);
this
.
downloadUserId
=
StringHelper
.
getFirst
(
this
.
downloadUserId
);
this
.
createDate
=
StringHelper
.
getFirst
(
this
.
createDate
,
DateHelper
.
getNow
());
this
.
createDate
=
StringHelper
.
getFirst
(
this
.
createDate
,
DateHelper
.
getNow
());
this
.
createUserId
=
StringHelper
.
getFirst
(
this
.
createUserId
);
this
.
createUserId
=
StringHelper
.
getFirst
(
this
.
createUserId
);
...
...
yzg-util-file/src/main/java/com/yanzuoguang/cloud/file/YzgExcelService.java
View file @
0dbf6a25
...
@@ -108,7 +108,7 @@ public class YzgExcelService {
...
@@ -108,7 +108,7 @@ public class YzgExcelService {
* @param response
* @param response
* @throws IOException
* @throws IOException
*/
*/
public
void
donwload
(
YzgFileDownloadReqVo
req
,
HttpServletResponse
response
)
throws
IOException
{
public
void
donwload
(
YzgFileDownloadReqVo
req
,
String
downloadUserId
,
HttpServletResponse
response
)
throws
IOException
{
YzgFileVo
load
=
fileDao
.
load
(
req
,
YzgFileVo
.
class
);
YzgFileVo
load
=
fileDao
.
load
(
req
,
YzgFileVo
.
class
);
if
(
load
==
null
)
{
if
(
load
==
null
)
{
throw
new
CodeException
(
"文件不存在或者已经删除"
);
throw
new
CodeException
(
"文件不存在或者已经删除"
);
...
@@ -124,6 +124,9 @@ public class YzgExcelService {
...
@@ -124,6 +124,9 @@ public class YzgExcelService {
if
(!
file
.
exists
())
{
if
(!
file
.
exists
())
{
throw
new
CodeException
(
"文件已经被删除,或者服务器之间没有共享文件目录"
);
throw
new
CodeException
(
"文件已经被删除,或者服务器之间没有共享文件目录"
);
}
}
load
.
setDownloadDate
(
DateHelper
.
getNow
());
load
.
setDownloadUserId
(
downloadUserId
);
fileDao
.
update
(
load
);
HttpFileHelper
.
localToDown
(
serverPath
,
load
.
getFileName
()
+
".xlsx"
,
response
);
HttpFileHelper
.
localToDown
(
serverPath
,
load
.
getFileName
()
+
".xlsx"
,
response
);
}
}
...
...
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