Merge pull request #7801 from dataease/pr@dev@fix_mobile_panel_tree_sort

fix: 移动端仪表板排序和pc端不一致
This commit is contained in:
fit2cloud-chenyw 2024-01-24 17:07:58 +08:00 committed by GitHub
commit 5e2081628a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,17 +3,15 @@
<mapper namespace="io.dataease.ext.MobileDirMapper"> <mapper namespace="io.dataease.ext.MobileDirMapper">
<select id="query" resultType="io.dataease.mobile.entity.PanelEntity"> <select id="query" resultType="io.dataease.mobile.entity.PanelEntity">
SELECT SELECT id,
id,
NAME AS text, NAME AS text,
pid, pid,
node_type AS `type` node_type AS `type`
FROM FROM panel_group g,
panel_group g,
(SELECT GET_V_AUTH_MODEL_ID_P_USE_MOBILE(#{userId}, 'panel') cids) t (SELECT GET_V_AUTH_MODEL_ID_P_USE_MOBILE(#{userId}, 'panel') cids) t
WHERE WHERE g.pid = #{pid}
g.pid = #{pid}
AND FIND_IN_SET(g.id, cids) AND FIND_IN_SET(g.id, cids)
ORDER BY g.panel_sort desc, CONVERT(g.name using gbk)
</select> </select>
<select id="queryWithName" resultType="io.dataease.mobile.entity.PanelEntity"> <select id="queryWithName" resultType="io.dataease.mobile.entity.PanelEntity">
@ -30,6 +28,7 @@
<if test="name != null"> <if test="name != null">
and name like CONCAT('%', #{name, jdbcType=VARCHAR}, '%') and name like CONCAT('%', #{name, jdbcType=VARCHAR}, '%')
</if> </if>
ORDER BY g.panel_sort desc, CONVERT(g.name using gbk)
</select> </select>
@ -37,24 +36,22 @@
select a.auth_source select a.auth_source
from sys_auth a from sys_auth a
left join sys_auth_detail d on a.id = d.auth_id left join sys_auth_detail d on a.id = d.auth_id
where where a.auth_target_type = 'user'
a.auth_target_type = 'user' and and a.auth_target = #{userId}
a.auth_target = #{userId} and and a.auth_source_type = 'panel'
a.auth_source_type = 'panel' and and d.privilege_type = 1
d.privilege_type = 1 and and d.privilege_value = 1
d.privilege_value = 1
</select> </select>
<select id="idsWithDept" resultType="java.lang.String"> <select id="idsWithDept" resultType="java.lang.String">
select a.auth_source select a.auth_source
from sys_auth a from sys_auth a
left join sys_auth_detail d on a.id = d.auth_id left join sys_auth_detail d on a.id = d.auth_id
where where a.auth_target_type = 'dept'
a.auth_target_type = 'dept' and and a.auth_target = #{deptId}
a.auth_target = #{deptId} and and a.auth_source_type = 'panel'
a.auth_source_type = 'panel' and and d.privilege_type = 1
d.privilege_type = 1 and and d.privilege_value = 1
d.privilege_value = 1
</select> </select>
<select id="idsWithRoles" resultType="java.lang.String"> <select id="idsWithRoles" resultType="java.lang.String">
@ -74,8 +71,4 @@
</select> </select>
</mapper> </mapper>