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
e9379318
Commit
e9379318
authored
Jan 10, 2022
by
284718418@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.云盘-我空间业务代码
parent
15f51552
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
205 additions
and
19 deletions
+205
-19
src/main/java/cn/timer/api/bean/disk/DiskCatalogue.java
+16
-0
src/main/java/cn/timer/api/bean/disk/DiskCloudDiskUser.java
+19
-0
src/main/java/cn/timer/api/controller/disk/DiskCatalogueController.java
+92
-16
src/main/java/cn/timer/api/controller/disk/sevice/DiskCatalogueService.java
+1
-3
src/main/java/cn/timer/api/controller/disk/sevice/DiskCloudDiskUserService.java
+23
-0
src/main/java/cn/timer/api/controller/disk/sevice/DiskCloudDiskUserServiceImpl.java
+41
-0
src/main/java/cn/timer/api/dto/disk/DiskCatalogueDto.java
+10
-0
src/main/resources/mapping/disk/DiskFilesMapper.xml
+3
-0
No files found.
src/main/java/cn/timer/api/bean/disk/DiskCatalogue.java
View file @
e9379318
...
@@ -143,4 +143,20 @@ public class DiskCatalogue extends Model<DiskCatalogue> {
...
@@ -143,4 +143,20 @@ public class DiskCatalogue extends Model<DiskCatalogue> {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
DiskCatalogue
>
breadcrumb
;
private
List
<
DiskCatalogue
>
breadcrumb
;
/**
* 用户类型:0.超级管理员,1.管理员,2.普通用户
*/
@ApiModelProperty
(
value
=
"用户类型:0.超级管理员,1.管理员,2.普通用户"
)
@Transient
@TableField
(
exist
=
false
)
private
Integer
userRole
;
/**
* 用户权限:r查看,w编辑,x删除,d下载:例如rwxd
*/
@Transient
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"用户权限:r查看,w编辑,x删除,d下载:例如rwxd"
)
private
String
userPower
;
}
}
src/main/java/cn/timer/api/bean/disk/DiskCloudDiskUser.java
View file @
e9379318
package
cn
.
timer
.
api
.
bean
.
disk
;
package
cn
.
timer
.
api
.
bean
.
disk
;
import
cn.timer.api.config.annotation.UserBean
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
...
@@ -84,4 +85,22 @@ public class DiskCloudDiskUser extends Model<DiskCloudDiskUser> {
...
@@ -84,4 +85,22 @@ public class DiskCloudDiskUser extends Model<DiskCloudDiskUser> {
*/
*/
@ApiModelProperty
(
value
=
"逻辑删除标记0.未删除 1.删除"
)
@ApiModelProperty
(
value
=
"逻辑删除标记0.未删除 1.删除"
)
private
Integer
deleteFlag
;
private
Integer
deleteFlag
;
public
String
getUserPower
()
{
return
userPower
;
}
public
void
setUserPower
(
String
userPower
)
{
switch
(
this
.
userRole
){
case
0
:
this
.
userPower
=
"rwxd"
;
break
;
case
1
:
this
.
userPower
=
"rwd"
;
break
;
case
2
:
this
.
userPower
=
"rd"
;
break
;
}
}
}
}
src/main/java/cn/timer/api/controller/disk/DiskCatalogueController.java
View file @
e9379318
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/disk/sevice/DiskCatalogueService.java
View file @
e9379318
...
@@ -23,9 +23,7 @@ public interface DiskCatalogueService {
...
@@ -23,9 +23,7 @@ public interface DiskCatalogueService {
/**
/**
* 我的文件夹
* 我的文件夹
* @param orgId
* @param diskCatalogueParam
* @param userId
* @param type
* @return
* @return
*/
*/
List
<
DiskCatalogue
>
getDiskCatalogue
(
DiskCatalogueParam
diskCatalogueParam
);
List
<
DiskCatalogue
>
getDiskCatalogue
(
DiskCatalogueParam
diskCatalogueParam
);
...
...
src/main/java/cn/timer/api/controller/disk/sevice/DiskCloudDiskUserService.java
0 → 100644
View file @
e9379318
package
cn
.
timer
.
api
.
controller
.
disk
.
sevice
;
import
cn.timer.api.bean.disk.DiskCatalogue
;
import
cn.timer.api.bean.disk.DiskCloudDiskUser
;
import
cn.timer.api.bean.disk.DiskFiles
;
import
cn.timer.api.dto.disk.DiskCatalogueDto
;
import
cn.timer.api.dto.disk.DiskCatalogueParam
;
import
java.util.List
;
/**
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022/1/4
*/
public
interface
DiskCloudDiskUserService
{
/**
* 判断用户是否拥有该权限
* @param diskCatalogueDto
* @return
*/
boolean
getDiskUserRole
(
DiskCatalogueDto
diskCatalogueDto
,
DiskCatalogue
catalogue
);
}
src/main/java/cn/timer/api/controller/disk/sevice/DiskCloudDiskUserServiceImpl.java
0 → 100644
View file @
e9379318
package
cn
.
timer
.
api
.
controller
.
disk
.
sevice
;
import
cn.timer.api.bean.disk.DiskCatalogue
;
import
cn.timer.api.bean.disk.DiskCloudDiskUser
;
import
cn.timer.api.config.enuminterface.JxglEnumInterface
;
import
cn.timer.api.dao.disk.DiskCloudDiskUserMapper
;
import
cn.timer.api.dto.disk.DiskCatalogueDto
;
import
cn.timer.api.utils.ResultUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
javax.annotation.Resource
;
/**
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021/12/29
*/
@Service
public
class
DiskCloudDiskUserServiceImpl
implements
DiskCloudDiskUserService
{
@Resource
private
DiskCloudDiskUserMapper
diskCloudDiskUserMapper
;
@Override
public
boolean
getDiskUserRole
(
DiskCatalogueDto
diskCatalogueDto
,
DiskCatalogue
catalogue
)
{
if
(
StringUtils
.
isEmpty
(
catalogue
)
||
StringUtils
.
isEmpty
(
diskCatalogueDto
)){
return
false
;
}
if
(
catalogue
.
getCreateUserId
().
equals
(
diskCatalogueDto
.
getUserId
())){
return
true
;
}
DiskCloudDiskUser
dcdUser
=
DiskCloudDiskUser
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
DiskCloudDiskUser
>()
.
lambda
().
eq
(
DiskCloudDiskUser:
:
getUserId
,
diskCatalogueDto
.
getUserId
()));
if
(
StringUtils
.
isEmpty
(
dcdUser
)){
return
false
;
}
return
false
;
}
}
src/main/java/cn/timer/api/dto/disk/DiskCatalogueDto.java
View file @
e9379318
package
cn
.
timer
.
api
.
dto
.
disk
;
package
cn
.
timer
.
api
.
dto
.
disk
;
import
cn.timer.api.bean.disk.DiskCloudDiskUser
;
import
cn.timer.api.config.exception.ValidationMsg
;
import
cn.timer.api.config.exception.ValidationMsg
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -10,6 +11,7 @@ import lombok.NoArgsConstructor;
...
@@ -10,6 +11,7 @@ import lombok.NoArgsConstructor;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
/**
/**
* @author wuqingjun
* @author wuqingjun
...
@@ -63,4 +65,12 @@ public class DiskCatalogueDto implements Serializable{
...
@@ -63,4 +65,12 @@ public class DiskCatalogueDto implements Serializable{
*/
*/
@ApiModelProperty
(
value
=
"备注信息"
)
@ApiModelProperty
(
value
=
"备注信息"
)
private
String
remark
;
private
String
remark
;
/**
* 用户ID
*/
@ApiModelProperty
(
value
=
"用户ID"
)
private
Integer
userId
;
@ApiModelProperty
(
value
=
"云空间成员"
)
List
<
DiskCloudDiskUser
>
diskCloudDiskUsers
;
}
}
src/main/resources/mapping/disk/DiskFilesMapper.xml
View file @
e9379318
...
@@ -26,6 +26,9 @@
...
@@ -26,6 +26,9 @@
LEFT JOIN disk_catalogue_files cf ON f.id=cf.files_id AND cf.id > 0
LEFT JOIN disk_catalogue_files cf ON f.id=cf.files_id AND cf.id > 0
WHERE f.delete_flag=0 AND cf.delete_flag = 0
WHERE f.delete_flag=0 AND cf.delete_flag = 0
AND f.create_user_id = #{param.userId} AND cf.catalogue_id=#{param.parentId}
AND f.create_user_id = #{param.userId} AND cf.catalogue_id=#{param.parentId}
<if
test=
"param.searchName != null and param.searchName != ''"
>
AND f.title like CONCAT('%',#{param.searchName},'%')
</if>
ORDER BY f.create_time DESC
ORDER BY f.create_time DESC
</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