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
f0d60fa1
Commit
f0d60fa1
authored
Mar 19, 2022
by
284718418@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG 空间大小总计
parent
29d6ef8b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
8 deletions
+12
-8
src/main/java/cn/timer/api/controller/disk/DiskFilesController.java
+3
-3
src/main/java/cn/timer/api/controller/disk/sevice/DiskFilesService.java
+1
-1
src/main/java/cn/timer/api/controller/disk/sevice/DiskFilesServiceImpl.java
+2
-2
src/main/java/cn/timer/api/dao/disk/DiskFilesMapper.java
+1
-1
src/main/resources/mapping/disk/DiskFilesMapper.xml
+5
-1
No files found.
src/main/java/cn/timer/api/controller/disk/DiskFilesController.java
View file @
f0d60fa1
...
...
@@ -231,11 +231,11 @@ public class DiskFilesController {
* @param userBean
* @return
*/
@GetMapping
(
value
=
"/mycatalogue"
)
@GetMapping
(
value
=
"/mycatalogue
/{type}
"
)
@ApiOperation
(
value
=
"我的文件空间大小"
,
httpMethod
=
"GET"
,
notes
=
"我的文件空间大小"
)
public
Result
<
Object
>
myCatalogue
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
Object
>
myCatalogue
(
@
PathVariable
(
"type"
)
Integer
type
,
@
CurrentUser
UserBean
userBean
)
{
try
{
DiskFileCatalogueDto
diskFileCatalogueDto
=
diskFilesService
.
getFileCount
(
userBean
);
DiskFileCatalogueDto
diskFileCatalogueDto
=
diskFilesService
.
getFileCount
(
userBean
,
type
);
return
ResultUtil
.
data
(
diskFileCatalogueDto
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
...
...
src/main/java/cn/timer/api/controller/disk/sevice/DiskFilesService.java
View file @
f0d60fa1
...
...
@@ -28,7 +28,7 @@ public interface DiskFilesService {
* @param userBean
* @return
*/
DiskFileCatalogueDto
getFileCount
(
UserBean
userBean
);
DiskFileCatalogueDto
getFileCount
(
UserBean
userBean
,
Integer
type
);
/**
* 删除文件
...
...
src/main/java/cn/timer/api/controller/disk/sevice/DiskFilesServiceImpl.java
View file @
f0d60fa1
...
...
@@ -30,8 +30,8 @@ public class DiskFilesServiceImpl implements DiskFilesService {
}
@Override
public
DiskFileCatalogueDto
getFileCount
(
UserBean
userBean
)
{
DiskFileCatalogueDto
dto
=
diskFilesMapper
.
selectFileCount
(
userBean
);
public
DiskFileCatalogueDto
getFileCount
(
UserBean
userBean
,
Integer
type
)
{
DiskFileCatalogueDto
dto
=
diskFilesMapper
.
selectFileCount
(
userBean
,
type
);
if
(
StringUtils
.
isEmpty
(
dto
)){
dto
=
new
DiskFileCatalogueDto
();
}
...
...
src/main/java/cn/timer/api/dao/disk/DiskFilesMapper.java
View file @
f0d60fa1
...
...
@@ -34,7 +34,7 @@ public interface DiskFilesMapper extends BaseMapper<DiskFiles> {
* @param userBean
* @return
*/
DiskFileCatalogueDto
selectFileCount
(
@Param
(
"param"
)
UserBean
userBean
);
DiskFileCatalogueDto
selectFileCount
(
@Param
(
"param"
)
UserBean
userBean
,
@Param
(
"type"
)
Integer
type
);
/**
* 删除文件
...
...
src/main/resources/mapping/disk/DiskFilesMapper.xml
View file @
f0d60fa1
...
...
@@ -37,7 +37,11 @@
SELECT COALESCE(sum(df.file_size),0) as countSize FROM `disk_files` df
LEFT JOIN disk_catalogue_files dcf ON df.id = dcf.files_id
LEFT JOIN disk_catalogue dc ON dc.id = dcf.catalogue_id
WHERE df.create_user_id = #{param.empNum} AND df.org_id=#{param.orgCode} AND df.delete_flag=0 AND dcf.delete_flag=0 AND dc.delete_flag=0 AND dc.type=0
WHERE df.delete_flag=0
<if
test=
"type == 1"
>
AND df.create_user_id = #{param.empNum}
</if>
AND df.org_id=#{param.orgCode} AND dcf.delete_flag=0 AND dc.delete_flag=0 AND dc.type = #{type}
</select>
...
...
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