package com.community.huiju.dao;

import com.community.huiju.model.TpRoomNo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

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

    int insert(TpRoomNo record);

    int insertSelective(TpRoomNo record);

    TpRoomNo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TpRoomNo record);

    int updateByPrimaryKey(TpRoomNo record);

    @ResultMap("BaseResultMap")
    @Select("select * from tp_room_no where community_id=#{communityId} " +
            "and phase_id=#{phaseId} " +
            "and building_id=#{buildingId} " +
            "and unit_id=#{unitId} " +
            "and level_id=#{levelId}")
    List<TpRoomNo> selectByAddress(Integer communityId, Integer phaseId, Integer buildingId, Integer unitId, Integer levelId);
}