
package com.tmerclub.cloud.platform.mapper;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author xxw
 * @version 1.0
 * @description:
 * @since 2024/1/5 15:32
 */
public interface SysAccessMenuMapper {
    /**
     * 根据角色id 批量添加角色与菜单关系
     *
     * @param sysAccessKeyId     角色ID
     * @param menuIdList 角色与菜单关系列表
     */
    void insertAccessKeyAndMenu(@Param("sysAccessKeyId") Long sysAccessKeyId, @Param("menuIdList") List<Long> menuIdList);

    /**
     * 获取关联平台端菜单权限
     *
     * @param sysAccessKeyId
     * @return
     */
    List<Long> queryAllPermsBySysMenu(@Param("sysAccessKeyId") Long sysAccessKeyId);
    /**
     * 获取关联商家端关联权限
     *
     * @param sysAccessKeyId
     * @return
     */
    List<Long> queryAllPermsByShopMenu(@Param("sysAccessKeyId") Long sysAccessKeyId);

    /**
     * 根据id获取关联权限
     * @param sysAccessKeyId
     * @return
     */
    List<Long> listMenuIdAccessId(@Param("sysAccessKeyId")Long sysAccessKeyId);

    /**
     * 根据sysAccessKeyId删除关联权限
     * @param sysAccessKeyId
     */
    void deleteSysAccessMenuById(@Param("sysAccessKeyId") Long sysAccessKeyId);
}
