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
01a8952e
Commit
01a8952e
authored
Feb 22, 2022
by
284718418@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.文件权限优化
2.BUG修复
parent
3f8fd8b6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
12 deletions
+28
-12
src/main/java/cn/timer/api/controller/disk/DiskCatalogueController.java
+20
-8
src/main/java/cn/timer/api/controller/disk/DiskFilesController.java
+2
-2
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+3
-0
src/main/resources/application-test.yml
+2
-2
src/main/resources/mapping/disk/DiskCloudDiskUserMapper.xml
+1
-0
No files found.
src/main/java/cn/timer/api/controller/disk/DiskCatalogueController.java
View file @
01a8952e
package
cn
.
timer
.
api
.
controller
.
disk
;
package
cn
.
timer
.
api
.
controller
.
disk
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.bean.disk.DiskCatalogue
;
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.DiskCloudDiskUser
;
import
cn.timer.api.bean.disk.DiskCloudDiskUser
;
...
@@ -75,6 +77,7 @@ public class DiskCatalogueController {
...
@@ -75,6 +77,7 @@ public class DiskCatalogueController {
@PostMapping
(
value
=
"/add_catalogue"
)
@PostMapping
(
value
=
"/add_catalogue"
)
@ApiOperation
(
value
=
"1.新建文件夹或共享空间"
,
httpMethod
=
"POST"
,
notes
=
"新建文件夹或共享空间:type=0共享空间,1文件夹"
)
@ApiOperation
(
value
=
"1.新建文件夹或共享空间"
,
httpMethod
=
"POST"
,
notes
=
"新建文件夹或共享空间:type=0共享空间,1文件夹"
)
@ApiOperationSupport
(
order
=
1
)
@ApiOperationSupport
(
order
=
1
)
@Log
(
title
=
"云盘-新建文件夹"
,
businessType
=
BusinessType
.
INSERT_UPDATE
)
public
Result
<
Object
>
addcatalogue
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
DiskCatalogueDto
diskCatalogueDto
)
{
public
Result
<
Object
>
addcatalogue
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
DiskCatalogueDto
diskCatalogueDto
)
{
try
{
try
{
DiskCatalogue
diskCatalogue
=
new
DiskCatalogue
();
DiskCatalogue
diskCatalogue
=
new
DiskCatalogue
();
...
@@ -170,6 +173,7 @@ public class DiskCatalogueController {
...
@@ -170,6 +173,7 @@ public class DiskCatalogueController {
@GetMapping
(
value
=
"/myfile_list"
)
@GetMapping
(
value
=
"/myfile_list"
)
@ApiOperation
(
value
=
"2.我的文件文件夹或共享空间列表"
,
httpMethod
=
"GET"
,
notes
=
"文件夹或共享空间:type=0共享空间,1文件夹"
)
@ApiOperation
(
value
=
"2.我的文件文件夹或共享空间列表"
,
httpMethod
=
"GET"
,
notes
=
"文件夹或共享空间:type=0共享空间,1文件夹"
)
@ApiOperationSupport
(
order
=
2
)
@ApiOperationSupport
(
order
=
2
)
@Log
(
title
=
"云盘-我的文件文件夹或共享空间列表"
,
businessType
=
BusinessType
.
OTHER
)
public
Result
<
Object
>
myfilelist
(
@CurrentUser
UserBean
userBean
,
public
Result
<
Object
>
myfilelist
(
@CurrentUser
UserBean
userBean
,
@ApiParam
(
"文件文件夹或共享空间ID"
)
@RequestParam
(
required
=
true
,
defaultValue
=
"0"
)
Integer
type
)
{
@ApiParam
(
"文件文件夹或共享空间ID"
)
@RequestParam
(
required
=
true
,
defaultValue
=
"0"
)
Integer
type
)
{
List
<
DiskCatalogue
>
list
=
diskCatalogueService
.
getDiskCatalogueList
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
type
);
List
<
DiskCatalogue
>
list
=
diskCatalogueService
.
getDiskCatalogueList
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
type
);
...
@@ -189,15 +193,19 @@ public class DiskCatalogueController {
...
@@ -189,15 +193,19 @@ public class DiskCatalogueController {
public
Result
<
Object
>
myfile
(
@CurrentUser
UserBean
userBean
,
DiskCatalogueParam
diskCatalogueParam
)
{
public
Result
<
Object
>
myfile
(
@CurrentUser
UserBean
userBean
,
DiskCatalogueParam
diskCatalogueParam
)
{
try
{
try
{
//diskCatalogueParam.setUserId(userBean.getEmpNum());
//diskCatalogueParam.setUserId(userBean.getEmpNum());
DiskCloudDiskUser
user
=
new
DiskCloudDiskUser
();
diskCatalogueParam
.
setOrgId
(
userBean
.
getOrgCode
());
diskCatalogueParam
.
setOrgId
(
userBean
.
getOrgCode
());
QueryWrapper
<
DiskCatalogue
>
queryWrapper
=
new
QueryWrapper
<
DiskCatalogue
>();
queryWrapper
.
lambda
().
eq
(
DiskCatalogue:
:
getOrgId
,
userBean
.
getOrgCode
());
// 云盘
if
((
StringUtils
.
isEmpty
(
diskCatalogueParam
.
getParentId
())
||
diskCatalogueParam
.
getParentId
()
==
0
)){
queryWrapper
.
lambda
().
eq
(
DiskCatalogue:
:
getCreateUserId
,
diskCatalogueParam
.
getUserId
());
}
queryWrapper
.
lambda
().
eq
(
DiskCatalogue:
:
getParentId
,
diskCatalogueParam
.
getParentId
());
queryWrapper
.
lambda
().
eq
(
DiskCatalogue:
:
getType
,
diskCatalogueParam
.
getType
());
queryWrapper
.
lambda
().
eq
(
DiskCatalogue:
:
getDeleteFlag
,
0
);
// 获取文件夹
// 获取文件夹
List
<
DiskCatalogue
>
diskCatalogueList
=
DiskCatalogue
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
DiskCatalogue
>()
List
<
DiskCatalogue
>
diskCatalogueList
=
DiskCatalogue
.
builder
().
build
().
selectList
(
queryWrapper
);
.
lambda
().
eq
(
DiskCatalogue:
:
getOrgId
,
userBean
.
getOrgCode
())
.
eq
(
DiskCatalogue:
:
getCreateUserId
,
diskCatalogueParam
.
getUserId
())
.
eq
(
DiskCatalogue:
:
getParentId
,
diskCatalogueParam
.
getParentId
())
.
eq
(
DiskCatalogue:
:
getType
,
diskCatalogueParam
.
getType
())
.
eq
(
DiskCatalogue:
:
getDeleteFlag
,
0
)
);
// 别人的空间,自己的权限级别
// 别人的空间,自己的权限级别
if
((
StringUtils
.
isEmpty
(
diskCatalogueParam
.
getParentId
())
||
diskCatalogueParam
.
getParentId
()
>
0
)
if
((
StringUtils
.
isEmpty
(
diskCatalogueParam
.
getParentId
())
||
diskCatalogueParam
.
getParentId
()
>
0
)
&&
JxglEnumInterface
.
DiskCatalogueType
.
DISK_YUN
.
getType
().
equals
(
diskCatalogueParam
.
getType
())){
&&
JxglEnumInterface
.
DiskCatalogueType
.
DISK_YUN
.
getType
().
equals
(
diskCatalogueParam
.
getType
())){
...
@@ -205,7 +213,7 @@ public class DiskCatalogueController {
...
@@ -205,7 +213,7 @@ public class DiskCatalogueController {
param
.
setUserId
(
userBean
.
getEmpNum
());
param
.
setUserId
(
userBean
.
getEmpNum
());
param
.
setOrgId
(
userBean
.
getOrgCode
());
param
.
setOrgId
(
userBean
.
getOrgCode
());
param
.
setCatalogueId
(
diskCatalogueParam
.
getParentId
());
param
.
setCatalogueId
(
diskCatalogueParam
.
getParentId
());
DiskCloudDiskUser
user
=
diskCloudDiskUserService
.
getUserRoleBySharedSpace
(
param
);
user
=
diskCloudDiskUserService
.
getUserRoleBySharedSpace
(
param
);
if
(!
StringUtils
.
isEmpty
(
user
)
&&
!
StringUtils
.
isEmpty
(
user
.
getId
())){
if
(!
StringUtils
.
isEmpty
(
user
)
&&
!
StringUtils
.
isEmpty
(
user
.
getId
())){
for
(
DiskCatalogue
entity
:
diskCatalogueList
)
{
for
(
DiskCatalogue
entity
:
diskCatalogueList
)
{
entity
.
setUserRole
(
user
.
getUserRole
());
entity
.
setUserRole
(
user
.
getUserRole
());
...
@@ -254,6 +262,7 @@ public class DiskCatalogueController {
...
@@ -254,6 +262,7 @@ public class DiskCatalogueController {
map
.
put
(
"diskCatalogueData"
,
diskCatalogueList
);
map
.
put
(
"diskCatalogueData"
,
diskCatalogueList
);
map
.
put
(
"diskFileData"
,
filesList
);
map
.
put
(
"diskFileData"
,
filesList
);
map
.
put
(
"breadcrumbData"
,
breadcrumbDataList
);
map
.
put
(
"breadcrumbData"
,
breadcrumbDataList
);
map
.
put
(
"diskUserRole"
,
user
);
return
ResultUtil
.
data
(
map
);
return
ResultUtil
.
data
(
map
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -282,6 +291,7 @@ public class DiskCatalogueController {
...
@@ -282,6 +291,7 @@ public class DiskCatalogueController {
*/
*/
@PostMapping
(
value
=
"/sign_out/{id}"
)
@PostMapping
(
value
=
"/sign_out/{id}"
)
@ApiOperation
(
value
=
"退出共享空间"
,
httpMethod
=
"POST"
,
notes
=
"退出共享空间"
)
@ApiOperation
(
value
=
"退出共享空间"
,
httpMethod
=
"POST"
,
notes
=
"退出共享空间"
)
@Log
(
title
=
"云盘-退出空间"
,
businessType
=
BusinessType
.
OTHER
)
public
Result
<
Object
>
signOut
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
public
Result
<
Object
>
signOut
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
try
{
try
{
DiskCloudDiskUser
diskCloudDiskUser
=
DiskCloudDiskUser
.
builder
().
id
(
id
).
build
().
selectById
();
DiskCloudDiskUser
diskCloudDiskUser
=
DiskCloudDiskUser
.
builder
().
id
(
id
).
build
().
selectById
();
...
@@ -311,6 +321,7 @@ public class DiskCatalogueController {
...
@@ -311,6 +321,7 @@ public class DiskCatalogueController {
*/
*/
@PostMapping
(
value
=
"/edit_catalogue"
)
@PostMapping
(
value
=
"/edit_catalogue"
)
@ApiOperation
(
value
=
"删除文件夹以及文件"
,
httpMethod
=
"POST"
,
notes
=
"删除文件夹以及文件"
)
@ApiOperation
(
value
=
"删除文件夹以及文件"
,
httpMethod
=
"POST"
,
notes
=
"删除文件夹以及文件"
)
@Log
(
title
=
"云盘-删除文件夹以及文件"
,
businessType
=
BusinessType
.
OTHER
)
public
Result
<
Object
>
editCatalogue
(
@CurrentUser
UserBean
userBean
,
@RequestBody
DiskCatalogueDto
diskCatalogueDto
)
{
public
Result
<
Object
>
editCatalogue
(
@CurrentUser
UserBean
userBean
,
@RequestBody
DiskCatalogueDto
diskCatalogueDto
)
{
try
{
try
{
DiskCatalogue
diskCatalogue
=
new
DiskCatalogue
();
DiskCatalogue
diskCatalogue
=
new
DiskCatalogue
();
...
@@ -435,6 +446,7 @@ public class DiskCatalogueController {
...
@@ -435,6 +446,7 @@ public class DiskCatalogueController {
@GetMapping
(
value
=
"/deleteAlLFile"
)
@GetMapping
(
value
=
"/deleteAlLFile"
)
@ApiOperation
(
value
=
"删除用户下的所有文件夹"
,
httpMethod
=
"GET"
,
notes
=
"文件夹或共享空间:type=0共享空间,1文件夹"
)
@ApiOperation
(
value
=
"删除用户下的所有文件夹"
,
httpMethod
=
"GET"
,
notes
=
"文件夹或共享空间:type=0共享空间,1文件夹"
)
@ApiOperationSupport
(
order
=
2
)
@ApiOperationSupport
(
order
=
2
)
@Log
(
title
=
"删除用户下的所有文件夹"
,
businessType
=
BusinessType
.
OTHER
)
private
Result
<
Object
>
deleteAlLFile
(
@CurrentUser
UserBean
userBean
,
DiskCatalogueParam
diskCatalogueParam
){
private
Result
<
Object
>
deleteAlLFile
(
@CurrentUser
UserBean
userBean
,
DiskCatalogueParam
diskCatalogueParam
){
List
<
DiskCatalogue
>
diskCatalogueList
=
DiskCatalogue
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
DiskCatalogue
>().
lambda
()
List
<
DiskCatalogue
>
diskCatalogueList
=
DiskCatalogue
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
DiskCatalogue
>().
lambda
()
.
eq
(
DiskCatalogue:
:
getCreateUserId
,
diskCatalogueParam
.
getUserId
())
.
eq
(
DiskCatalogue:
:
getCreateUserId
,
diskCatalogueParam
.
getUserId
())
...
...
src/main/java/cn/timer/api/controller/disk/DiskFilesController.java
View file @
01a8952e
...
@@ -173,9 +173,9 @@ public class DiskFilesController {
...
@@ -173,9 +173,9 @@ public class DiskFilesController {
try
{
try
{
DiskFiles
entity
=
new
DiskFiles
();
DiskFiles
entity
=
new
DiskFiles
();
DiskFiles
diskFiles
=
DiskFiles
.
builder
().
id
(
diskFilesParam
.
getId
()).
build
().
selectById
();
DiskFiles
diskFiles
=
DiskFiles
.
builder
().
id
(
diskFilesParam
.
getId
()).
build
().
selectById
();
if
(
StringUtils
.
isEmpty
(
diskFiles
)
||
!
diskFiles
.
getCreateUserId
().
equals
(
userBean
.
getEmpNum
()))
{
/*
if (StringUtils.isEmpty(diskFiles) || !diskFiles.getCreateUserId().equals(userBean.getEmpNum())) {
return ResultUtil.error("无权限,操作失败!");
return ResultUtil.error("无权限,操作失败!");
}
}
*/
entity
.
setId
(
diskFiles
.
getId
());
entity
.
setId
(
diskFiles
.
getId
());
entity
.
setTitle
(
diskFilesParam
.
getName
());
entity
.
setTitle
(
diskFilesParam
.
getName
());
entity
.
setUpdateUserId
(
userBean
.
getEmpNum
());
entity
.
setUpdateUserId
(
userBean
.
getEmpNum
());
...
...
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
01a8952e
...
@@ -10,6 +10,8 @@ import java.util.List;
...
@@ -10,6 +10,8 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.locks.ReentrantLock
;
import
java.util.concurrent.locks.ReentrantLock
;
import
cn.timer.api.aspect.lang.annotation.Log
;
import
cn.timer.api.aspect.lang.enums.BusinessType
;
import
cn.timer.api.bean.dzht.DzhtAssoMbzj
;
import
cn.timer.api.bean.dzht.DzhtAssoMbzj
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
...
@@ -1242,6 +1244,7 @@ public class TimeCardController {
...
@@ -1242,6 +1244,7 @@ public class TimeCardController {
@DeleteMapping
(
value
=
"/AttendanceGroup/{id}"
)
@DeleteMapping
(
value
=
"/AttendanceGroup/{id}"
)
@ApiOperation
(
value
=
"39:删除考勤组"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"39:删除考勤组"
,
httpMethod
=
"DELETE"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
39
)
@ApiOperationSupport
(
order
=
39
)
@Log
(
title
=
"考勤设置-删除考勤组"
,
businessType
=
BusinessType
.
DELETE
)
public
Result
<
Integer
>
DelAttendanceGroup
(
@CurrentUser
UserBean
userBean
,
@PathVariable
(
"id"
)
Integer
id
)
{
public
Result
<
Integer
>
DelAttendanceGroup
(
@CurrentUser
UserBean
userBean
,
@PathVariable
(
"id"
)
Integer
id
)
{
List
<
UserAttendanceRel
>
attusers
=
userattendancerelmapper
.
selectAttendanceOfficerByKqzid
(
id
,
userBean
.
getOrgCode
());
//该考勤组人数
List
<
UserAttendanceRel
>
attusers
=
userattendancerelmapper
.
selectAttendanceOfficerByKqzid
(
id
,
userBean
.
getOrgCode
());
//该考勤组人数
...
...
src/main/resources/application-test.yml
View file @
01a8952e
...
@@ -220,8 +220,8 @@ sftp:
...
@@ -220,8 +220,8 @@ sftp:
password
:
'
fksdlfjs(*&&%HGgjfkdjsfhksh9781283KFHFFGHghhndbv##2@'
password
:
'
fksdlfjs(*&&%HGgjfkdjsfhksh9781283KFHFFGHghhndbv##2@'
root
:
'
/home'
root
:
'
/home'
sessionStrictHostKeyChecking
:
'
no'
sessionStrictHostKeyChecking
:
'
no'
sessionConnectTimeout
:
'
1500'
sessionConnectTimeout
:
'
1500
0
'
channelConnectedTimeout
:
'
1500'
channelConnectedTimeout
:
'
1500
0
'
serverUrl
:
'
https://test-img.8timer.cn'
serverUrl
:
'
https://test-img.8timer.cn'
targetPath
:
'
/disk'
targetPath
:
'
/disk'
reservedName
:
false
reservedName
:
false
...
...
src/main/resources/mapping/disk/DiskCloudDiskUserMapper.xml
View file @
01a8952e
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
WHERE c.delete_flag=0 AND cdu.delete_flag = 0
WHERE c.delete_flag=0 AND cdu.delete_flag = 0
AND cdu.user_id = #{param.userId}
AND cdu.user_id = #{param.userId}
AND cdu.org_id = #{param.orgId}
AND cdu.org_id = #{param.orgId}
AND c.parent_id = #{param.parentId}
<if
test=
"param.id != null and param.id != ''"
>
<if
test=
"param.id != null and param.id != ''"
>
AND c.id = #{param.id}
AND c.id = #{param.id}
</if>
</if>
...
...
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