package com.bofeng.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.bofeng.entity.UptownHome;
import com.bofeng.entity.UptownHouse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UptownHouseMapper extends BaseMapper<UptownHouse> {

    @Select("select * from sys_uptown_house where status = 1 and uptown_id = #{uptownId}")
    List<UptownHouse> getAllUptownHouse(@Param("uptownId") Long uptownId);

    @Select("select * from sys_uptown_house where status = 1 and unit_id = #{unitId} and doorplate = #{doorplate}")
    List<UptownHome> getUptownHouseBy(@Param("unitId") Long unitId, @Param("doorplate") String doorplate);
}
