Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
f26ec872
Commit
f26ec872
authored
Mar 19, 2022
by
284718418@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG 云盘上传
parent
abf77cb2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
src/main/java/cn/timer/api/controller/disk/DiskFilesController.java
+20
-2
src/main/resources/application-pro.yml
+1
-1
No files found.
src/main/java/cn/timer/api/controller/disk/DiskFilesController.java
View file @
f26ec872
...
@@ -4,6 +4,7 @@ import cn.timer.api.bean.disk.DiskCatalogue;
...
@@ -4,6 +4,7 @@ import cn.timer.api.bean.disk.DiskCatalogue;
import
cn.timer.api.bean.disk.DiskCatalogueFiles
;
import
cn.timer.api.bean.disk.DiskCatalogueFiles
;
import
cn.timer.api.bean.disk.DiskFiles
;
import
cn.timer.api.bean.disk.DiskFiles
;
import
cn.timer.api.bean.disk.DiskFilesLog
;
import
cn.timer.api.bean.disk.DiskFilesLog
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enuminterface.JxglEnumInterface
;
import
cn.timer.api.config.enuminterface.JxglEnumInterface
;
...
@@ -75,9 +76,26 @@ public class DiskFilesController {
...
@@ -75,9 +76,26 @@ public class DiskFilesController {
@PostMapping
(
"/upload"
)
@PostMapping
(
"/upload"
)
@ApiOperation
(
value
=
"上传普通文件"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"上传普通文件"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
upload
(
@CurrentUser
UserBean
userBean
,
@RequestParam
(
required
=
true
)
MultipartFile
[]
file
,
public
Result
<
Object
>
upload
(
@CurrentUser
UserBean
userBean
,
@RequestParam
(
required
=
true
)
MultipartFile
[]
file
,
@ApiParam
(
"文件文件夹或共享空间ID"
)
@RequestParam
(
required
=
tru
e
)
Integer
catalogueId
,
HttpServletRequest
request
)
{
@ApiParam
(
"文件文件夹或共享空间ID"
)
@RequestParam
(
required
=
fals
e
)
Integer
catalogueId
,
HttpServletRequest
request
)
{
if
(
catalogueId
<=
0
){
if
(
catalogueId
<=
0
){
return
ResultUtil
.
error
(
"上传失败,请选择文件夹"
);
DiskCatalogue
diskCatalogue
=
DiskCatalogue
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
DiskCatalogue
>().
select
(
"id"
)
.
eq
(
"org_id"
,
userBean
.
getOrgCode
())
.
eq
(
"delete_flag"
,
0
)
.
eq
(
"create_user_id"
,
userBean
.
getEmpNum
()).
orderByAsc
(
"create_time"
)
);
if
(
StringUtils
.
isEmpty
(
diskCatalogue
)){
diskCatalogue
=
new
DiskCatalogue
();
diskCatalogue
.
setCreateUserId
(
userBean
.
getEmpNum
());
diskCatalogue
.
setOrgId
(
userBean
.
getOrgCode
());
diskCatalogue
.
setParentIds
(
""
);
diskCatalogue
.
setName
(
"我的文件夹"
);
diskCatalogue
.
setUserName
(
userBean
.
getUserInfo
().
getName
());
diskCatalogue
.
setType
(
JxglEnumInterface
.
DiskCatalogueType
.
DISK_FILE
.
getType
());
diskCatalogue
.
insert
();
}
catalogueId
=
diskCatalogue
.
getId
();
//return ResultUtil.error("上传失败,请选择文件夹");
}
}
if
(
file
==
null
||
file
.
length
==
0
)
{
if
(
file
==
null
||
file
.
length
==
0
)
{
return
ResultUtil
.
error
(
"上传失败,请选择上传文件"
);
return
ResultUtil
.
error
(
"上传失败,请选择上传文件"
);
...
...
src/main/resources/application-pro.yml
View file @
f26ec872
...
@@ -215,7 +215,7 @@ zip:
...
@@ -215,7 +215,7 @@ zip:
sftp
:
sftp
:
client
:
client
:
protocol
:
'
sftp'
protocol
:
'
sftp'
host
:
'
39.108.180.180
'
host
:
'
112.74.91.126
'
port
:
'
22'
port
:
'
22'
username
:
'
root'
username
:
'
root'
password
:
'
fksdlfjs(*&&%HGgjfkdjsfhksh9781283KFHFFGHghhndbv##2@'
password
:
'
fksdlfjs(*&&%HGgjfkdjsfhksh9781283KFHFFGHghhndbv##2@'
...
...
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