fix(仪表板): 仪表板分享报错
This commit is contained in:
parent
553f674c21
commit
9a8dcb6a97
@ -41,13 +41,19 @@
|
|||||||
left join panel_group g on g.id = s.panel_group_id
|
left join panel_group g on g.id = s.panel_group_id
|
||||||
left join sys_user u on u.username = IFNULL(s.granter,g.create_by)
|
left join sys_user u on u.username = IFNULL(s.granter,g.create_by)
|
||||||
where
|
where
|
||||||
( s.target_id = #{userId} and s.type = 0 ) or
|
( s.target_id = #{userId} and s.type = 0 )
|
||||||
( s.target_id = #{deptId} and s.type = 2 ) or
|
<if test="deptId != null">
|
||||||
( s.target_id in
|
or ( s.target_id = #{deptId} and s.type = 2 )
|
||||||
<foreach collection="roleIds" item="roleId" open='(' separator=',' close=')'>
|
</if>
|
||||||
#{roleId}
|
<if test="roleIds != null">
|
||||||
</foreach>
|
or
|
||||||
and s.type = 1 )
|
( s.target_id in
|
||||||
|
<foreach collection="roleIds" item="roleId" open='(' separator=',' close=')'>
|
||||||
|
#{roleId}
|
||||||
|
</foreach>
|
||||||
|
and s.type = 1 )
|
||||||
|
</if>
|
||||||
|
|
||||||
<if test="orderByClause == null">
|
<if test="orderByClause == null">
|
||||||
order by s.create_time desc
|
order by s.create_time desc
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@ -349,7 +349,7 @@ public class ShareService {
|
|||||||
Map<String, Object> param = new HashMap<>();
|
Map<String, Object> param = new HashMap<>();
|
||||||
param.put("userId", userId);
|
param.put("userId", userId);
|
||||||
param.put("deptId", deptId);
|
param.put("deptId", deptId);
|
||||||
param.put("roleIds", roleIds);
|
param.put("roleIds", CollectionUtils.isNotEmpty(roleIds)? roleIds: null);
|
||||||
|
|
||||||
List<PanelSharePo> datas = extPanelShareMapper.query(param);
|
List<PanelSharePo> datas = extPanelShareMapper.query(param);
|
||||||
List<PanelShareDto> dtoLists = datas.stream().map(po -> BeanUtils.copyBean(new PanelShareDto(), po))
|
List<PanelShareDto> dtoLists = datas.stream().map(po -> BeanUtils.copyBean(new PanelShareDto(), po))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user