Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-auth-client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a9ac219e
authored
Mar 27, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
指定授权bug修复
1 parent
b89adf76
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
src/main/java/cn/com/glsx/auth/interceptor/DataOnlySharedInterceptor.java
src/main/java/cn/com/glsx/auth/interceptor/DataPermitLinkInterceptor.java
src/main/java/cn/com/glsx/auth/interceptor/DataOnlySharedInterceptor.java
View file @
a9ac219
...
...
@@ -193,7 +193,7 @@ public class DataOnlySharedInterceptor implements Interceptor {
private
void
handleWhereCriterial
(
Long
userId
,
PlainSelect
plain
,
String
mainTableName
,
String
permitTable
,
boolean
addTableAlias
)
throws
JSQLParserException
{
Expression
where
=
plain
.
getWhere
();
String
dataAuthSql
=
permitTable
+
".receiver_id = "
+
userId
;
String
dataAuthSql
=
permitTable
+
".receiver_id = "
+
userId
+
" and "
+
permitTable
+
".del_flag = 0 "
;
if
(
where
==
null
)
{
plain
.
setWhere
(
CCJSqlParserUtil
.
parseCondExpression
(
dataAuthSql
));
}
else
{
...
...
src/main/java/cn/com/glsx/auth/interceptor/DataPermitLinkInterceptor.java
View file @
a9ac219
...
...
@@ -247,6 +247,7 @@ public class DataPermitLinkInterceptor implements Interceptor {
Expression
where
=
plain
.
getWhere
();
String
dataAuthSql
=
permitTable
+
".receiver_id in ("
+
StringUtils
.
join
(
userIds
,
','
)
+
") "
;
dataAuthSql
+=
(
" and "
+
permitTable
+
".del_flag = 0 "
);
if
(
where
==
null
)
{
plain
.
setWhere
(
CCJSqlParserUtil
.
parseCondExpression
(
dataAuthSql
));
}
else
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment