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
d0e3f73b
Commit
d0e3f73b
authored
Jan 14, 2022
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除用户下的所有文件
parent
e7243de1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
src/main/java/cn/timer/api/controller/disk/DiskCatalogueController.java
+36
-0
No files found.
src/main/java/cn/timer/api/controller/disk/DiskCatalogueController.java
View file @
d0e3f73b
...
...
@@ -392,4 +392,40 @@ public class DiskCatalogueController {
map
.
put
(
"breadcrumbData"
,
breadcrumbDataList
);
return
ResultUtil
.
data
(
map
);
}
@GetMapping
(
value
=
"/deleteAlLFile"
)
@ApiOperation
(
value
=
"删除用户下的所有文件夹"
,
httpMethod
=
"GET"
,
notes
=
"文件夹或共享空间:type=0共享空间,1文件夹"
)
@ApiOperationSupport
(
order
=
2
)
private
Result
<
Object
>
deleteAlLFile
(
@CurrentUser
UserBean
userBean
,
DiskCatalogueParam
diskCatalogueParam
){
List
<
DiskCatalogue
>
diskCatalogueList
=
DiskCatalogue
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
DiskCatalogue
>().
lambda
()
.
eq
(
DiskCatalogue:
:
getCreateUserId
,
diskCatalogueParam
.
getUserId
())
.
eq
(
DiskCatalogue:
:
getParentId
,
0
)
.
eq
(
DiskCatalogue:
:
getDeleteFlag
,
0
));
if
(
diskCatalogueList
.
size
()<=
0
){
return
ResultUtil
.
error
(
"该用户下没有文件"
);
}
/*查找ids第一个*/
diskCatalogueList
.
forEach
(
d
->{
// List<DiskCatalogue> subFileList =DiskCatalogue.builder().build().selectList(new QueryWrapper<DiskCatalogue>().lambda()
// .like(DiskCatalogue::getParentIds,d.getId())
// .eq(DiskCatalogue::getDeleteFlag,0));
// List<DiskCatalogue> subFileList =diskCatalogueService.getSubCatalogueList(d.getId().toString(),diskCatalogueParam.getUserId());
// subFileList.forEach(s->{
// List<DiskCatalogueFiles> diskCatalogueFilesList = DiskCatalogueFiles.builder().build().selectList(new QueryWrapper<DiskCatalogueFiles>().lambda()
// .eq(DiskCatalogueFiles::getCatalogueId,s.getId())
// .eq(DiskCatalogueFiles::getDeleteFlag,0));
// diskCatalogueFilesList.forEach(f->{
// DiskFiles.builder().deleteFlag(1).build().update(new QueryWrapper<DiskFiles>().lambda().eq(DiskFiles::getId,f.getFilesId()));
// });
// s.setDeleteFlag(1);
// s.updateById();
// });
d
.
setDeleteFlag
(
1
);
d
.
updateById
();
});
return
ResultUtil
.
success
();
}
}
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