瀏覽代碼

Merge branch 'master' of http://git.dayaedu.com/yonge/cooleshow

liujunchi 3 年之前
父節點
當前提交
dcdede3815
共有 1 個文件被更改,包括 14 次插入1 次删除
  1. 14 1
      cooleshow-auth/auth-server/src/main/resources/config/mybatis/SysMenuMapper.xml

+ 14 - 1
cooleshow-auth/auth-server/src/main/resources/config/mybatis/SysMenuMapper.xml

@@ -176,7 +176,20 @@
         SELECT sm.* FROM sys_menu sm
         LEFT JOIN sys_role_menu srm ON srm.menu_id_ = sm.id_
         LEFT JOIN sys_user_role sur ON sur.role_id_ = srm.role_id_
-        <include refid="queryTree"/>
+        left join sys_role r on sur.role_id_ = r.id_
+        where r.del_flag_ = 0 and r.is_enable_ = 1
+        <if test="userId != null">
+            AND sur.user_id_ = #{userId}
+        </if>
+        <if test="hid != null">
+            AND sm.hidden_ = #{hid}
+        </if>
+        <if test="delFlag != null">
+            AND sm.del_flag_ = #{delFlag}
+        </if>
+        <if test="parentId != null">
+            AND sm.parent_id_ = #{parentId}
+        </if>
         GROUP BY sm.id_
         ORDER BY sm.sort_ DESC,sm.id_ DESC
     </select>