package com.community.huiju.dao;


import com.community.huiju.model.TaSysUserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

@Mapper
public interface TaSysUserRoleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TaSysUserRole record);

    int insertSelective(TaSysUserRole record);

    TaSysUserRole selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TaSysUserRole record);

    int updateByPrimaryKey(TaSysUserRole record);

    Integer findSysUserRoleByUserIdAndRoleId(Integer userId);

    /**
     *    communityId 小区ID
     *    userId 用户ID
     *
     * @param map
     * @return
     */
    TaSysUserRole selectByCommunityIdAndUserId(Map<String,Object> map);

    /**
     *查询角色
     * @param userId
     * @return
     */
    TaSysUserRole selectRole(@Param("communityId") Integer communityId,@Param("userId") Integer userId);
}