package com.jpsoft.shinestar.modules.sys.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.jpsoft.shinestar.modules.sys.entity.Permission;
import java.util.Map;
import com.jpsoft.shinestar.modules.common.dto.Sort;

@Repository
public interface PermissionDAO {
	int insert(Permission entity);
	int update(Permission entity);
	int exist(@Param("path") String path,@Param("method") String method);
	Permission get(String id);
	int delete(String id);
	List<Permission> list();
	List<Permission> search(Map<String,Object> searchParams,List<Sort> sortList);
    int hasPermitted(@Param("userId") String userId,@Param("path") String path,@Param("method") String method);
}