package com.zjty.tynotes.pas.dao;

import com.zjty.tynotes.pas.entity.Authority;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * @Author: mcj
 * @Date: 19-4-29 下午2:16
 * @Version 1.0
 */
public interface AuthorityDao extends MongoRepository<Authority, String> {
    /**
     * 根据id查询权限
     * @param ids id
     * @return list
     */
    List<Authority> findAllByIdIn(List<String> ids);

    /**
     * 根据id和名称查找权限
     * @param ids
     * @return
     */
    Authority findByIdInAndName(List<String> ids,String name);

    void deleteAllByNameIn(List<String> name);

    List<Authority> findAllByNameIn(List<String> name);
}
