forked from github/dataease
Merge pull request #7801 from dataease/pr@dev@fix_mobile_panel_tree_sort
fix: 移动端仪表板排序和pc端不一致
This commit is contained in:
commit
5e2081628a
@ -3,17 +3,15 @@
|
||||
<mapper namespace="io.dataease.ext.MobileDirMapper">
|
||||
|
||||
<select id="query" resultType="io.dataease.mobile.entity.PanelEntity">
|
||||
SELECT
|
||||
id,
|
||||
NAME AS text,
|
||||
pid,
|
||||
node_type AS `type`
|
||||
FROM
|
||||
panel_group g,
|
||||
( SELECT GET_V_AUTH_MODEL_ID_P_USE_MOBILE ( #{userId}, 'panel' ) cids ) t
|
||||
WHERE
|
||||
g.pid = #{pid}
|
||||
AND FIND_IN_SET( g.id, cids )
|
||||
SELECT id,
|
||||
NAME AS text,
|
||||
pid,
|
||||
node_type AS `type`
|
||||
FROM panel_group g,
|
||||
(SELECT GET_V_AUTH_MODEL_ID_P_USE_MOBILE(#{userId}, 'panel') cids) t
|
||||
WHERE g.pid = #{pid}
|
||||
AND FIND_IN_SET(g.id, cids)
|
||||
ORDER BY g.panel_sort desc, CONVERT(g.name using gbk)
|
||||
</select>
|
||||
|
||||
<select id="queryWithName" resultType="io.dataease.mobile.entity.PanelEntity">
|
||||
@ -26,35 +24,34 @@
|
||||
panel_group g,
|
||||
( SELECT GET_V_AUTH_MODEL_ID_P_USE_MOBILE ( #{userId}, 'panel' ) cids ) t
|
||||
WHERE
|
||||
FIND_IN_SET( g.id, cids )
|
||||
<if test="name != null">
|
||||
and name like CONCAT('%', #{name, jdbcType=VARCHAR}, '%')
|
||||
</if>
|
||||
FIND_IN_SET( g.id, cids )
|
||||
<if test="name != null">
|
||||
and name like CONCAT('%', #{name, jdbcType=VARCHAR}, '%')
|
||||
</if>
|
||||
ORDER BY g.panel_sort desc, CONVERT(g.name using gbk)
|
||||
</select>
|
||||
|
||||
|
||||
<select id="idsWithUser" resultType="java.lang.String">
|
||||
select a.auth_source
|
||||
from sys_auth a
|
||||
left join sys_auth_detail d on a.id = d.auth_id
|
||||
where
|
||||
a.auth_target_type = 'user' and
|
||||
a.auth_target = #{userId} and
|
||||
a.auth_source_type = 'panel' and
|
||||
d.privilege_type = 1 and
|
||||
d.privilege_value = 1
|
||||
left join sys_auth_detail d on a.id = d.auth_id
|
||||
where a.auth_target_type = 'user'
|
||||
and a.auth_target = #{userId}
|
||||
and a.auth_source_type = 'panel'
|
||||
and d.privilege_type = 1
|
||||
and d.privilege_value = 1
|
||||
</select>
|
||||
|
||||
<select id="idsWithDept" resultType="java.lang.String">
|
||||
select a.auth_source
|
||||
from sys_auth a
|
||||
left join sys_auth_detail d on a.id = d.auth_id
|
||||
where
|
||||
a.auth_target_type = 'dept' and
|
||||
a.auth_target = #{deptId} and
|
||||
a.auth_source_type = 'panel' and
|
||||
d.privilege_type = 1 and
|
||||
d.privilege_value = 1
|
||||
left join sys_auth_detail d on a.id = d.auth_id
|
||||
where a.auth_target_type = 'dept'
|
||||
and a.auth_target = #{deptId}
|
||||
and a.auth_source_type = 'panel'
|
||||
and d.privilege_type = 1
|
||||
and d.privilege_value = 1
|
||||
</select>
|
||||
|
||||
<select id="idsWithRoles" resultType="java.lang.String">
|
||||
@ -62,20 +59,16 @@
|
||||
from sys_auth a
|
||||
left join sys_auth_detail d on a.id = d.auth_id
|
||||
where
|
||||
a.auth_target_type = 'role' and
|
||||
a.auth_target in
|
||||
<foreach collection="roleIds" item="roleId" open='(' separator=',' close=')'>
|
||||
#{roleId}
|
||||
</foreach>
|
||||
and
|
||||
a.auth_source_type = 'panel' and
|
||||
d.privilege_type = 1 and
|
||||
d.privilege_value = 1
|
||||
a.auth_target_type = 'role' and
|
||||
a.auth_target in
|
||||
<foreach collection="roleIds" item="roleId" open='(' separator=',' close=')'>
|
||||
#{roleId}
|
||||
</foreach>
|
||||
and
|
||||
a.auth_source_type = 'panel' and
|
||||
d.privilege_type = 1 and
|
||||
d.privilege_value = 1
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user