package com.huiju.estateagents.property.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huiju.estateagents.property.model.TpLevel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 小区楼层资料表 Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2019-04-01
 */
@Mapper
public interface TpLevelMapper extends BaseMapper<TpLevel> {
    /**
     * 根据 小区id，期id，楼栋id，单元id 进行查询
     * @param orgId
     * @param phaseId
     * @param buildingId
     * @param unitId
     * @return
     */
    @ResultType(TpLevel.class)
    @Select("select * from tp_level where org_id=#{orgId} and phase_id=#{phaseId} and building_id=#{buildingId} and unit_id=#{unitId}")
    List<TpLevel> selectByAddress(Integer orgId, Integer phaseId, Integer buildingId, Integer unitId);
}
