Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
f88571cb
提交
f88571cb
authored
8月 11, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 数据集消息获取接受人权限错误
上级
d77aa35d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
13 行增加
和
3 行删除
+13
-3
ExtAuthServiceImpl.java
...ava/io/dataease/auth/service/impl/ExtAuthServiceImpl.java
+4
-2
ExtAuthMapper.java
.../main/java/io/dataease/base/mapper/ext/ExtAuthMapper.java
+2
-1
ExtAuthMapper.xml
...c/main/java/io/dataease/base/mapper/ext/ExtAuthMapper.xml
+7
-0
没有找到文件。
backend/src/main/java/io/dataease/auth/service/impl/ExtAuthServiceImpl.java
浏览文件 @
f88571cb
...
@@ -43,9 +43,11 @@ public class ExtAuthServiceImpl implements ExtAuthService {
...
@@ -43,9 +43,11 @@ public class ExtAuthServiceImpl implements ExtAuthService {
@Override
@Override
public
AuthURD
resourceTarget
(
String
resourceId
)
{
public
AuthURD
resourceTarget
(
String
resourceId
)
{
AuthURD
authURD
=
new
AuthURD
();
AuthURD
authURD
=
new
AuthURD
();
SysAuthExample
example
=
new
SysAuthExample
();
/*
SysAuthExample example = new SysAuthExample();
example.createCriteria().andAuthSourceEqualTo(resourceId);
example.createCriteria().andAuthSourceEqualTo(resourceId);
List
<
SysAuth
>
sysAuths
=
sysAuthMapper
.
selectByExample
(
example
);
List<SysAuth> sysAuths = sysAuthMapper.selectByExample(example);*/
List
<
SysAuth
>
sysAuths
=
extAuthMapper
.
queryByResource
(
resourceId
);
Map
<
String
,
List
<
SysAuth
>>
authMap
=
sysAuths
.
stream
().
collect
(
Collectors
.
groupingBy
(
SysAuth:
:
getAuthTargetType
));
Map
<
String
,
List
<
SysAuth
>>
authMap
=
sysAuths
.
stream
().
collect
(
Collectors
.
groupingBy
(
SysAuth:
:
getAuthTargetType
));
if
(!
CollectionUtils
.
isEmpty
(
authMap
.
get
(
"user"
)))
{
if
(!
CollectionUtils
.
isEmpty
(
authMap
.
get
(
"user"
)))
{
authURD
.
setUserIds
(
authMap
.
get
(
"user"
).
stream
().
map
(
item
->
Long
.
parseLong
(
item
.
getAuthTarget
())).
collect
(
Collectors
.
toList
()));
authURD
.
setUserIds
(
authMap
.
get
(
"user"
).
stream
().
map
(
item
->
Long
.
parseLong
(
item
.
getAuthTarget
())).
collect
(
Collectors
.
toList
()));
...
...
backend/src/main/java/io/dataease/base/mapper/ext/ExtAuthMapper.java
浏览文件 @
f88571cb
package
io
.
dataease
.
base
.
mapper
.
ext
;
package
io
.
dataease
.
base
.
mapper
.
ext
;
import
io.dataease.base.domain.SysAuth
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -12,6 +13,6 @@ public interface ExtAuthMapper {
...
@@ -12,6 +13,6 @@ public interface ExtAuthMapper {
List
<
Long
>
queryUserIdWithDeptIds
(
@Param
(
"deptIds"
)
List
<
Long
>
deptIds
);
List
<
Long
>
queryUserIdWithDeptIds
(
@Param
(
"deptIds"
)
List
<
Long
>
deptIds
);
List
<
SysAuth
>
queryByResource
(
@Param
(
"resourceId"
)
String
resourceId
);
// Set<Long> queryUserIdWithRD(@Param("roleIds") List<Long> roleIds, @Param("deptIds") List<Long> deptIds);
// Set<Long> queryUserIdWithRD(@Param("roleIds") List<Long> roleIds, @Param("deptIds") List<Long> deptIds);
}
}
backend/src/main/java/io/dataease/base/mapper/ext/ExtAuthMapper.xml
浏览文件 @
f88571cb
...
@@ -23,5 +23,12 @@
...
@@ -23,5 +23,12 @@
</select>
</select>
<select
id=
"queryByResource"
resultMap=
"io.dataease.base.mapper.SysAuthMapper.BaseResultMap"
>
select a.*
from sys_auth a left join sys_auth_detail b on a.id = b.auth_id
where a.auth_source = #{resourceId} and b.privilege_value = 1
</select>
</mapper>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论