package com.ym.mec.biz.dal.dao;

import com.ym.mec.biz.dal.entity.MemberRankPrivileges;
import com.ym.mec.common.dal.BaseDAO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MemberRankPrivilegesDao extends BaseDAO<Integer, MemberRankPrivileges>{


    void batchInsert(@Param("memberRankSettingId") Integer memberRankSettingId, @Param("memberPrivilegesItemIdList") List<Integer> memberPrivilegesItemIdList);

    List<MemberRankPrivileges> findByRankSettingId(Integer memberRankSettingId);

    void deleteByRankSettingId(Integer memberRankSettingId);

    /**
     * 当前功能是否被会员使用
     * @param parentId
     * @return
     */
    boolean hasPrivileges(Integer parentId);
}