Explorar el Código

修改B端查询查询bug

liangbo.huang hace 3 días
padre
commit
3b46ffbd7a

+ 1 - 1
trade-admin/src/main/java/com/trade/admin/system/mapper/SysMenuMapper.java

@@ -33,7 +33,7 @@ public interface SysMenuMapper {
      * @param menu 菜单信息
      * @return 菜单列表
      */
-    List<SysMenu> selectMenuListByUserId(SysMenu menu,@Param("userId") Long userId);
+    List<SysMenu> selectMenuListByUserId(@Param("menu") SysMenu menu,@Param("userId") Long userId);
 
     /**
      * 根据角色ID查询权限

+ 6 - 6
trade-admin/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -66,14 +66,14 @@
 		left join sys_user_role ur on rm.role_id = ur.role_id
 		left join sys_role ro on ur.role_id = ro.id
 		where ur.user_id = #{userId}
-		<if test="menuName != null and menuName != ''">
-            AND m.menu_name like concat('%', #{menuName}, '%')
+		<if test="menu.menuName != null and menu.menuName != ''">
+            AND m.menu_name like concat('%', #{menu.menuName}, '%')
 		</if>
-		<if test="visible != null and visible != ''">
-            AND m.visible = #{visible}
+		<if test="menu.visible != null and menu.visible != ''">
+            AND m.visible = #{menu.visible}
 		</if>
-		<if test="status != null and status != ''">
-            AND m.status = #{status}
+		<if test="menu.status != null and menu.status != ''">
+            AND m.status = #{menu.status}
 		</if>
 		order by m.parent_id, m.order_num
 	</select>