package com.xintong.visualinspection.dao.master;

import java.util.List;
import java.util.Map;

import com.xintong.visualinspection.bean.Role;
import org.apache.ibatis.annotations.Mapper;

import com.xintong.visualinspection.pojo.RoleData;

/**
 * 文件名：UserInfoDao
 * 版本信息：日期：2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
 */
@Mapper
public interface RoleDao  {
    public List<Role> getRole(Role role);
    public void insert(Role role);
    public void update(Role role);
    public void delete(Integer id);
    
    
    public void roleBindPermission(Map<String,Integer> part);
    public void roleBindUser(Map<String,Integer> part);
    public void roleBindDepartment(Map<String,Integer> part);
    public void roleBindJob(Map<String,Integer> part);
    
    public List<Role> getRoleByDept(Integer departmentId);
    public List<Role> getRoleByUser(Integer userId);
    public List<Role> getRoleByPosition(Integer positionId);
    
    public List<RoleData> getRolesCount(Role role);
    
    public void roleUnBindUser(Integer userId);
    
    public List<Role> getRoleByPermision(Integer permisionid);
    
}
