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
5effcffb
Commit
5effcffb
authored
Sep 12, 2023
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.8' into MVP1.5.8
parents
95506d0d
0626bd5b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
32 deletions
+35
-32
SysUserInfoServiceImpl.java
...us/v1/permission/service/impl/SysUserInfoServiceImpl.java
+34
-31
SysMenuMapper.xml
...ermission-biz/src/main/resources/mapper/SysMenuMapper.xml
+1
-1
No files found.
yifu-permission/yifu-permission-biz/src/main/java/com/yifu/cloud/plus/v1/permission/service/impl/SysUserInfoServiceImpl.java
View file @
5effcffb
...
...
@@ -216,7 +216,7 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
sql
.
append
(
" 1=2 "
);
// 继续下一步,找数据权限配置
List
<
SysUserPermission
>
permissionList
=
sysUserPermissionMapper
.
getUserPermissionByUserId
(
userId
);
if
(
permissionList
!=
null
&&
!
permissionList
.
isEmpty
()
&&
Common
.
isNotNull
(
menu
.
getCustomerId
())
)
{
if
(
permissionList
!=
null
&&
!
permissionList
.
isEmpty
()
)
{
setAuthSql
(
sql
,
"1"
,
menu
.
getCustomerId
(),
permissionList
);
setAuthSql
(
sql
,
"2"
,
menu
.
getBussinessId
(),
permissionList
);
setAuthSql
(
sql
,
"3"
,
menu
.
getQuotationId
(),
permissionList
);
...
...
@@ -225,24 +225,24 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
setAuthSql
(
sql
,
"6"
,
menu
.
getBuId
(),
permissionList
);
setAuthSql
(
sql
,
"7"
,
menu
.
getLineId
(),
permissionList
);
setAuthSql
(
sql
,
"9"
,
menu
.
getIncomeId
(),
permissionList
);
// TODO-部门
setAuthSqlByDept
(
sql
,
menu
.
getDeptId
(),
permissionList
);
}
}
}
if
(
Common
.
isNotNull
(
sql
))
{
if
(
Common
.
isNotNull
(
sql
)
&&
sql
.
length
()
>
0
)
{
return
" or ( "
+
sql
+
" ) "
;
}
return
""
;
}
private
void
setAuthSql
(
StringBuilder
sql
,
String
type
,
String
shuXing
,
List
<
SysUserPermission
>
permissionList
)
{
if
(
Common
.
isNotNull
(
shuXing
))
{
StringBuilder
tempValue
=
new
StringBuilder
();
for
(
SysUserPermission
permission
:
permissionList
)
{
if
((
"6"
.
equals
(
type
)
||
"7"
.
equals
(
type
))
&&
type
.
equals
(
permission
.
getPermissionTyp
e
()))
{
if
((
"6"
.
equals
(
type
)
||
"7"
.
equals
(
type
))
&&
type
.
equals
(
permission
.
getPermissionType
())
&&
Common
.
isNotNull
(
permission
.
getNam
e
()))
{
tempValue
.
append
(
"'"
).
append
(
permission
.
getName
()).
append
(
"',"
);
}
else
if
(
type
.
equals
(
permission
.
getPermissionTyp
e
()))
{
}
else
if
(
type
.
equals
(
permission
.
getPermissionType
())
&&
Common
.
isNotNull
(
permission
.
getCod
e
()))
{
tempValue
.
append
(
"'"
).
append
(
permission
.
getCode
()).
append
(
"',"
);
}
}
...
...
@@ -251,11 +251,13 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
}
sql
.
append
(
" or ("
).
append
(
shuXing
).
append
(
" in ("
).
append
(
tempValue
).
append
(
"))"
);
}
}
private
void
setAuthSqlByDept
(
StringBuilder
sql
,
String
shuXing
,
List
<
SysUserPermission
>
permissionList
)
{
if
(
Common
.
isNotNull
(
shuXing
))
{
StringBuilder
tempValue
=
new
StringBuilder
();
for
(
SysUserPermission
permission
:
permissionList
)
{
if
(
"8"
.
equals
(
permission
.
getPermissionTyp
e
()))
{
if
(
"8"
.
equals
(
permission
.
getPermissionType
())
&&
Common
.
isNotNull
(
permission
.
getCod
e
()))
{
tempValue
.
append
(
"'"
).
append
(
permission
.
getCode
()).
append
(
"',"
);
}
}
...
...
@@ -264,6 +266,7 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
}
sql
.
append
(
" or ("
).
append
(
shuXing
).
append
(
" in ("
).
append
(
tempValue
).
append
(
"))"
);
}
}
/**
...
...
yifu-permission/yifu-permission-biz/src/main/resources/mapper/SysMenuMapper.xml
View file @
5effcffb
...
...
@@ -96,7 +96,7 @@
SELECT
<include
refid=
"Base_Column_List"
/>
FROM sys_menu a
where a.DELETE_STATUS = '1' and a.PERMISSION_STATUS='0' and a.MODEL_ID = {modelId}
where a.DELETE_STATUS = '1' and a.PERMISSION_STATUS='0' and a.MODEL_ID =
#
{modelId}
limit 1
</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