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
2ee4feb0
Commit
2ee4feb0
authored
Sep 18, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单权限修改
parent
f1756e1d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
SysUserPermissionServiceImpl.java
...permission/service/impl/SysUserPermissionServiceImpl.java
+9
-9
No files found.
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/service/impl/SysUserPermissionServiceImpl.java
View file @
2ee4feb0
...
@@ -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
())
...
@@ -77,7 +77,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
...
@@ -77,7 +77,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
.
eq
(
SysUserPermission:
:
getPermissionType
,
sysUserPermission
.
getPermissionType
())
.
eq
(
SysUserPermission:
:
getPermissionType
,
sysUserPermission
.
getPermissionType
())
.
eq
(
SysUserPermission:
:
getName
,
sysUserPermission
.
getName
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
eq
(
SysUserPermission:
:
getName
,
sysUserPermission
.
getName
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
permission
))
{
if
(
Common
.
isNotNull
(
permission
))
{
return
R
.
failed
(
"系统中已经存在对应
的名称权限维度
"
);
return
R
.
failed
(
"系统中已经存在对应
名称的权限类型
"
);
}
}
}
else
{
}
else
{
permission
=
this
.
getOne
(
Wrappers
.<
SysUserPermission
>
query
().
lambda
()
permission
=
this
.
getOne
(
Wrappers
.<
SysUserPermission
>
query
().
lambda
()
...
@@ -85,7 +85,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
...
@@ -85,7 +85,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
.
eq
(
SysUserPermission:
:
getPermissionType
,
sysUserPermission
.
getPermissionType
())
.
eq
(
SysUserPermission:
:
getPermissionType
,
sysUserPermission
.
getPermissionType
())
.
eq
(
SysUserPermission:
:
getCode
,
sysUserPermission
.
getCode
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
eq
(
SysUserPermission:
:
getCode
,
sysUserPermission
.
getCode
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
permission
))
{
if
(
Common
.
isNotNull
(
permission
))
{
return
R
.
failed
(
"系统中已经存在对应
的编码的权限维度
"
);
return
R
.
failed
(
"系统中已经存在对应
编码的权限类型
"
);
}
}
}
}
this
.
save
(
sysUserPermission
);
this
.
save
(
sysUserPermission
);
...
@@ -300,7 +300,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
...
@@ -300,7 +300,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
flag
.
append
(
"_"
);
flag
.
append
(
"_"
);
flag
.
append
(
excel
.
getCode
());
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
;
}
else
{
}
else
{
uniqueMap
.
put
(
flag
.
toString
(),
CommonConstants
.
ONE_STRING
);
uniqueMap
.
put
(
flag
.
toString
(),
CommonConstants
.
ONE_STRING
);
...
@@ -318,7 +318,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
...
@@ -318,7 +318,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
count
=
baseMapper
.
selectDictByName
(
excel
.
getName
(),
"line"
);
count
=
baseMapper
.
selectDictByName
(
excel
.
getName
(),
"line"
);
}
}
if
(
count
<
1
)
{
if
(
count
<
1
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"不存在对应
维度
的名称信息"
,
excel
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"不存在对应
权限类型
的名称信息"
,
excel
));
continue
;
continue
;
}
}
permission
=
this
.
getOne
(
Wrappers
.<
SysUserPermission
>
query
().
lambda
()
permission
=
this
.
getOne
(
Wrappers
.<
SysUserPermission
>
query
().
lambda
()
...
@@ -326,7 +326,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
...
@@ -326,7 +326,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
.
eq
(
SysUserPermission:
:
getPermissionType
,
insert
.
getPermissionType
())
.
eq
(
SysUserPermission:
:
getPermissionType
,
insert
.
getPermissionType
())
.
eq
(
SysUserPermission:
:
getName
,
excel
.
getName
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
.
eq
(
SysUserPermission:
:
getName
,
excel
.
getName
()).
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
permission
))
{
if
(
Common
.
isNotNull
(
permission
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"系统中已经存在该用户对应的名称
权限维度
"
,
excel
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"系统中已经存在该用户对应的名称
的权限类型
"
,
excel
));
continue
;
continue
;
}
}
insert
.
setCode
(
null
);
insert
.
setCode
(
null
);
...
@@ -334,7 +334,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
...
@@ -334,7 +334,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
//判断对应维度的编码是否存在
//判断对应维度的编码是否存在
Integer
count
=
this
.
checkExit
(
insert
.
getPermissionType
(),
excel
.
getCode
());
Integer
count
=
this
.
checkExit
(
insert
.
getPermissionType
(),
excel
.
getCode
());
if
(
count
<
1
)
{
if
(
count
<
1
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"不存在对应
维度
的编码信息"
,
excel
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"不存在对应
权限类型
的编码信息"
,
excel
));
continue
;
continue
;
}
}
permission
=
this
.
getOne
(
Wrappers
.<
SysUserPermission
>
query
().
lambda
()
permission
=
this
.
getOne
(
Wrappers
.<
SysUserPermission
>
query
().
lambda
()
...
@@ -342,7 +342,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
...
@@ -342,7 +342,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
.
isNotNull
(
permission
))
{
if
(
Common
.
isNotNull
(
permission
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"系统中已经存在该用户对应的编码的权限
维度
"
,
excel
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"系统中已经存在该用户对应的编码的权限
类型
"
,
excel
));
continue
;
continue
;
}
}
}
}
...
@@ -356,7 +356,7 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
...
@@ -356,7 +356,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
;
}
}
}
}
...
...
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