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
b6cca82e
Commit
b6cca82e
authored
Mar 19, 2022
by
284718418@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG 空间大小总计
parent
a9fb2bb0
Show 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 @
b6cca82e
...
@@ -231,11 +231,11 @@ public class DiskFilesController {
...
@@ -231,11 +231,11 @@ public class DiskFilesController {
* @param userBean
* @param userBean
* @return
* @return
*/
*/
@GetMapping
(
value
=
"/mycatalogue"
)
@GetMapping
(
value
=
"/mycatalogue
/{type}
"
)
@ApiOperation
(
value
=
"我的文件空间大小"
,
httpMethod
=
"GET"
,
notes
=
"我的文件空间大小"
)
@ApiOperation
(
value
=
"我的文件空间大小"
,
httpMethod
=
"GET"
,
notes
=
"我的文件空间大小"
)
public
Result
<
Object
>
myCatalogue
(
@CurrentUser
UserBean
userBean
)
{
public
Result
<
Object
>
myCatalogue
(
@
PathVariable
(
"type"
)
Integer
type
,
@
CurrentUser
UserBean
userBean
)
{
try
{
try
{
DiskFileCatalogueDto
diskFileCatalogueDto
=
diskFilesService
.
getFileCount
(
userBean
);
DiskFileCatalogueDto
diskFileCatalogueDto
=
diskFilesService
.
getFileCount
(
userBean
,
type
);
return
ResultUtil
.
data
(
diskFileCatalogueDto
);
return
ResultUtil
.
data
(
diskFileCatalogueDto
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
src/main/java/cn/timer/api/controller/disk/sevice/DiskFilesService.java
View file @
b6cca82e
...
@@ -28,7 +28,7 @@ public interface DiskFilesService {
...
@@ -28,7 +28,7 @@ public interface DiskFilesService {
* @param userBean
* @param userBean
* @return
* @return
*/
*/
DiskFileCatalogueDto
getFileCount
(
UserBean
userBean
);
DiskFileCatalogueDto
getFileCount
(
UserBean
userBean
,
Integer
type
);
/**
/**
* 删除文件
* 删除文件
...
...
src/main/java/cn/timer/api/controller/disk/sevice/DiskFilesServiceImpl.java
View file @
b6cca82e
...
@@ -30,8 +30,8 @@ public class DiskFilesServiceImpl implements DiskFilesService {
...
@@ -30,8 +30,8 @@ public class DiskFilesServiceImpl implements DiskFilesService {
}
}
@Override
@Override
public
DiskFileCatalogueDto
getFileCount
(
UserBean
userBean
)
{
public
DiskFileCatalogueDto
getFileCount
(
UserBean
userBean
,
Integer
type
)
{
DiskFileCatalogueDto
dto
=
diskFilesMapper
.
selectFileCount
(
userBean
);
DiskFileCatalogueDto
dto
=
diskFilesMapper
.
selectFileCount
(
userBean
,
type
);
if
(
StringUtils
.
isEmpty
(
dto
)){
if
(
StringUtils
.
isEmpty
(
dto
)){
dto
=
new
DiskFileCatalogueDto
();
dto
=
new
DiskFileCatalogueDto
();
}
}
...
...
src/main/java/cn/timer/api/dao/disk/DiskFilesMapper.java
View file @
b6cca82e
...
@@ -34,7 +34,7 @@ public interface DiskFilesMapper extends BaseMapper<DiskFiles> {
...
@@ -34,7 +34,7 @@ public interface DiskFilesMapper extends BaseMapper<DiskFiles> {
* @param userBean
* @param userBean
* @return
* @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 @
b6cca82e
...
@@ -37,7 +37,11 @@
...
@@ -37,7 +37,11 @@
SELECT COALESCE(sum(df.file_size),0) as countSize FROM `disk_files` df
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_files dcf ON df.id = dcf.files_id
LEFT JOIN disk_catalogue dc ON dc.id = dcf.catalogue_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>
</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