package com.goafanti.common.dao;

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

import com.goafanti.common.model.Role;
import com.goafanti.common.model.UserRole;
import org.apache.ibatis.annotations.Param;

public interface UserRoleMapper {
	int insert(UserRole record);

	int insertSelective(UserRole record);

	List<String> findUserIdByRoleId(String rid);

	List<String> findUserIdByRoleIds(List<String> roleIds);

	void deleteByRoleId(List<String> records);


	int deleteByUserId(String id);

	int insertBatch(Map<String, Object> params);

	List<String> listAuditor();

	/**
	 * 获取角色对应管理员编号
	 * @param roleName
	 * @return
	 */
	List<UserRole> selectAdminRole(String roleName);

    Role selectById(String roleId);

	Integer  selectByUidAndRoleName(@Param("aid") String aid, @Param("roleName") String roleName);
}
