Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
d1ba8736
Commit
d1ba8736
authored
Sep 18, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单权限修改
parent
2ee4feb0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
4 deletions
+22
-4
SysUserPermissionVo.java
...cloud/plus/v1/yifu/permission/vo/SysUserPermissionVo.java
+2
-1
SysUserPermissionServiceImpl.java
...permission/service/impl/SysUserPermissionServiceImpl.java
+14
-3
application.yml
...on/yifu-permission-biz/src/main/resources/application.yml
+6
-0
No files found.
yifu-permission/yifu-permission-api/src/main/java/com/yifu/cloud/plus/v1/yifu/permission/vo/SysUserPermissionVo.java
View file @
d1ba8736
...
@@ -55,8 +55,9 @@ public class SysUserPermissionVo extends RowIndex implements Serializable {
...
@@ -55,8 +55,9 @@ public class SysUserPermissionVo extends RowIndex implements Serializable {
/**
/**
* 权限类型
* 权限类型
*/
*/
@NotBlank
(
message
=
"权限类型 不能为空"
)
@Length
(
max
=
8
,
message
=
"权限类型 不能超过8 个字符"
)
@Length
(
max
=
8
,
message
=
"权限类型 不能超过8 个字符"
)
@ExcelAttribute
(
name
=
"权限类型"
,
maxLength
=
8
)
@ExcelAttribute
(
name
=
"权限类型"
,
isNotEmpty
=
true
,
errorInfo
=
"权限类型 不能为空"
,
maxLength
=
8
)
@Schema
(
description
=
"权限类型"
)
@Schema
(
description
=
"权限类型"
)
@ExcelProperty
(
"权限类型"
)
@ExcelProperty
(
"权限类型"
)
private
String
permissionType
;
private
String
permissionType
;
...
...
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/service/impl/SysUserPermissionServiceImpl.java
View file @
d1ba8736
...
@@ -67,7 +67,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
...
@@ -67,7 +67,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
.
eq
(
SysUserPermission:
:
getEmpLoginName
,
user
.
getUsername
())
.
eq
(
SysUserPermission:
:
getEmpLoginName
,
user
.
getUsername
())
.
eq
(
SysUserPermission:
:
getCode
,
sysUserPermission
.
getCode
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
eq
(
SysUserPermission:
:
getCode
,
sysUserPermission
.
getCode
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isEmpty
(
permission
))
{
if
(
Common
.
isEmpty
(
permission
))
{
return
R
.
failed
(
"
只有自己有权限的权限类型才可新增
"
);
return
R
.
failed
(
"
操作人仅可对本账号有权限的数据新增账号
"
);
}
}
}
}
if
(
CommonConstants
.
SIX_STRING
.
equals
(
sysUserPermission
.
getPermissionType
())
if
(
CommonConstants
.
SIX_STRING
.
equals
(
sysUserPermission
.
getPermissionType
())
...
@@ -292,13 +292,24 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
...
@@ -292,13 +292,24 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
insert
.
setPermissionType
(
typeMap
.
get
(
excel
.
getPermissionType
()));
insert
.
setPermissionType
(
typeMap
.
get
(
excel
.
getPermissionType
()));
}
}
//部门权限的时候是否含下级必填
if
(
CommonConstants
.
EIGHT_STRING
.
equals
(
insert
.
getPermissionType
())
&&
Common
.
isEmpty
(
excel
.
getIsContains
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"权限类型为部门权限时,是否含下级部门必填"
,
excel
));
continue
;
}
//登录账号+维度+唯一标识唯一
//登录账号+维度+唯一标识唯一
StringBuilder
flag
=
new
StringBuilder
();
StringBuilder
flag
=
new
StringBuilder
();
flag
.
append
(
excel
.
getEmpLoginName
());
flag
.
append
(
excel
.
getEmpLoginName
());
flag
.
append
(
"_"
);
flag
.
append
(
"_"
);
flag
.
append
(
insert
.
getPermissionType
());
flag
.
append
(
insert
.
getPermissionType
());
flag
.
append
(
"_"
);
flag
.
append
(
"_"
);
flag
.
append
(
excel
.
getCode
());
if
(
CommonConstants
.
SIX_STRING
.
equals
(
insert
.
getPermissionType
())
||
CommonConstants
.
SEVEN_STRING
.
equals
(
insert
.
getPermissionType
()))
{
flag
.
append
(
excel
.
getName
());
}
else
{
flag
.
append
(
excel
.
getCode
());
}
if
(
null
!=
uniqueMap
.
get
(
flag
.
toString
()))
{
if
(
null
!=
uniqueMap
.
get
(
flag
.
toString
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"导表中已经存在该登录名对应的权限类型的名称或者编码!"
,
excel
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"导表中已经存在该登录名对应的权限类型的名称或者编码!"
,
excel
));
continue
;
continue
;
...
@@ -356,7 +367,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
...
@@ -356,7 +367,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
.
eq
(
SysUserPermission:
:
getPermissionType
,
insert
.
getPermissionType
())
.
eq
(
SysUserPermission:
:
getPermissionType
,
insert
.
getPermissionType
())
.
eq
(
SysUserPermission:
:
getCode
,
excel
.
getCode
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
eq
(
SysUserPermission:
:
getCode
,
excel
.
getCode
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isEmpty
(
permission
))
{
if
(
Common
.
isEmpty
(
permission
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"
只有自己有权限的权限类型才可导入
"
,
excel
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"
操作人仅可对本账号有权限的数据新增账号
"
,
excel
));
continue
;
continue
;
}
}
}
}
...
...
yifu-permission/yifu-permission-biz/src/main/resources/application.yml
View file @
d1ba8736
...
@@ -31,6 +31,12 @@ mybatis-plus:
...
@@ -31,6 +31,12 @@ mybatis-plus:
spring
:
spring
:
application
:
application
:
name
:
@
artifactId@
name
:
@
artifactId@
servlet
:
multipart
:
#所有上传文件最大大小
max-request-size
:
100MB
#单个文件最大大小
max-file-size
:
50MB
#swagger 文档 https://springdoc.org/
#swagger 文档 https://springdoc.org/
### OpenAPI3 注解
### OpenAPI3 注解
# OpenAPI 3 注解位置
# OpenAPI 3 注解位置
...
...
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