zhongrj
2023-05-15 bdeb1fbd8a7933b8425bbed2b0093dfa1c2b4d3e
skjcmanager/skjcmanager-service/skjcmanager-system/src/main/java/cn/gistack/system/mapper/RoleMapper.xml
@@ -26,14 +26,26 @@
    <select id="tree" resultMap="treeNodeResultMap">
        select id, parent_id, role_name as title, id as "value", id as "key" from blade_role where is_deleted = 0
        <if test="param1!=null">
        <if test="param1!=null and param1!=''">
            and tenant_id = #{param1}
        </if>
        <if test="param2!=null">
        <if test="param2!=null  and param2!=''">
            and role_alias &lt;&gt; #{param2}
        </if>
    </select>
    <select id="treeByParentId" resultMap="treeNodeResultMap">
        select id, parent_id, role_name as title, id as "value", id as "key" from blade_role where is_deleted = 0
        <if test="_parameter!=null and _parameter!=''">
            and (
                id = #{_parameter} or parent_id = #{_parameter} or parent_id in (
                select b.id from blade_role b where b.is_deleted = 0 and b.PARENT_ID = #{_parameter}
                ) or role_alias like '%zrr'
            )
        </if>
        ORDER BY sort
    </select>
    <select id="getRoleNames" resultType="java.lang.String">
        SELECT
        role_name