package com.yunzhi.marketing.center.taUser.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yunzhi.marketing.entity.SysButtonInMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author admin
 * @Title: TaUserAuthButtonMapper
 * @Description: TODO
 * @date 2019/9/23
 */
@Mapper
public interface TaUserAuthButtonMapper  extends BaseMapper<SysButtonInMenu> {
    /**
     * 根据用户Id查询按钮列表
     * @param userId
     * @return
     */
    List<SysButtonInMenu> sysButtonListByUserId(@Param("userId")String userId);


    /**
     * 根据角色Id查询按钮列表
     * @param page
     * @return
     */
    List<SysButtonInMenu> sysButtonListByRoleId();

    void deleteUserAuthButton(@Param("userId") Integer userId);

    void addUserAuthButton(@Param("userId") Integer userId, @Param("sysButtons") List<SysButtonInMenu> sysButtonInMenus);
}
