Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
site-project
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
hqzhdj
site-project
Commits
b992c7e0
Commit
b992c7e0
authored
Jan 10, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的配置信息角色校验
parent
69ccf164
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/MyItemConfigMapper.java
+1
-1
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/MyItemConfigServiceImpl.java
+5
-1
cloud-site-service/src/main/resources/mapper/MyItemConfigMapper.xml
+5
-0
No files found.
cloud-site-service/src/main/java/com/yizhi/site/application/mapper/MyItemConfigMapper.java
View file @
b992c7e0
...
@@ -18,5 +18,5 @@ public interface MyItemConfigMapper extends BaseMapper<MyItemConfig> {
...
@@ -18,5 +18,5 @@ public interface MyItemConfigMapper extends BaseMapper<MyItemConfig> {
List
<
MyItemConfig
>
queryMyitemConfigByCondition
(
@Param
(
"name"
)
String
name
,
@Param
(
"showable"
)
Integer
showable
,
@Param
(
"terminalType"
)
Integer
terminalType
,
@Param
(
"siteId"
)
Long
siteId
);
List
<
MyItemConfig
>
queryMyitemConfigByCondition
(
@Param
(
"name"
)
String
name
,
@Param
(
"showable"
)
Integer
showable
,
@Param
(
"terminalType"
)
Integer
terminalType
,
@Param
(
"siteId"
)
Long
siteId
);
List
<
MyItemConfig
>
queryByAuthoity
(
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"terminalType"
)
List
<
Integer
>
terminalType
,
@Param
(
"showAble"
)
Integer
showAble
);
List
<
MyItemConfig
>
queryByAuthoity
(
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"terminalType"
)
List
<
Integer
>
terminalType
,
@Param
(
"showAble"
)
Integer
showAble
,
@Param
(
"accountId"
)
Long
accountId
);
}
}
cloud-site-service/src/main/java/com/yizhi/site/application/service/impl/MyItemConfigServiceImpl.java
View file @
b992c7e0
...
@@ -97,7 +97,11 @@ public class MyItemConfigServiceImpl extends ServiceImpl<MyItemConfigMapper, MyI
...
@@ -97,7 +97,11 @@ public class MyItemConfigServiceImpl extends ServiceImpl<MyItemConfigMapper, MyI
@Override
@Override
public
List
<
MyItemConfig
>
queryByAuthoity
(
Long
siteId
,
List
<
Integer
>
terminalType
,
Integer
showAble
)
{
public
List
<
MyItemConfig
>
queryByAuthoity
(
Long
siteId
,
List
<
Integer
>
terminalType
,
Integer
showAble
)
{
return
myItemConfigmapper
.
queryByAuthoity
(
siteId
,
terminalType
,
showAble
);
Long
accountId
=
ContextHolder
.
get
().
getAccountId
();
if
(
accountId
==
0L
){
accountId
=
null
;
}
return
myItemConfigmapper
.
queryByAuthoity
(
siteId
,
terminalType
,
showAble
,
accountId
);
}
}
@Override
@Override
...
...
cloud-site-service/src/main/resources/mapper/MyItemConfigMapper.xml
View file @
b992c7e0
...
@@ -66,6 +66,11 @@
...
@@ -66,6 +66,11 @@
<if
test=
"siteId !=null"
>
<if
test=
"siteId !=null"
>
and my.site_id = #{siteId}
and my.site_id = #{siteId}
</if>
</if>
<if
test=
"accountId !=null"
>
my.id in(
select item_id from my_item_config_role where role_id in(
select role_id from cloud_system.authz_account_role aar where account_id =#{accountId}))
</if>
<if
test=
"terminalType !=null"
>
<if
test=
"terminalType !=null"
>
and my.terminal_type in
and my.terminal_type in
<foreach
collection=
"terminalType"
item=
"t"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"terminalType"
item=
"t"
open=
"("
close=
")"
separator=
","
>
...
...
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