You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
898 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.yanzhen.mapper; // 定义包名
import com.yanzhen.entity.Menu; // 导入Menu实体类
import com.yanzhen.entity.User; // 导入User实体类
import org.apache.ibatis.annotations.Param; // 导入MyBatis的@Param注解
import java.util.List; // 导入List集合
public interface MenuMapper { // 定义MenuMapper接口
public List<Menu> query(Integer userId); // 根据用户ID查询菜单列表
public List<Menu> queryByType(); // 查询所有类型的菜单
public List<Menu> list(); // 列出所有菜单
public int createUserMenu(@Param("userId") Integer userId, @Param("menuId") Integer menuId); // 为用户创建菜单关联用户ID和菜单ID
public int deleteUserMenu(@Param("userId") Integer userId); // 删除用户的菜单根据用户ID
public List<Integer> queryCheckMenuId(Integer userId); // 查询用户已选择的菜单ID列表
}