package incheon.sgp.rst.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import incheon.sgp.rst.mapper.RstPrcMapper;
import incheon.sgp.rst.service.RstPrcService;
import incheon.sgp.rst.vo.RstPrcBldgResultVO;
import incheon.sgp.rst.vo.RstPrcDetailVO;

/**
 * @ClassName : RstPrcServiceImpl.java
 * @Description : 전세가율 가격통계 서비스 구현체
 * @author : 이주훈
 * @since : 2025.11.14
 * @version : 1.0
 */
@Service
public class RstPrcServiceImpl  implements RstPrcService {

	// 매퍼 주입
    private final RstPrcMapper rstPrcMapper; 

    // 매퍼 생성자 주입
    public RstPrcServiceImpl(RstPrcMapper rstPrcMapper) {
        this.rstPrcMapper = rstPrcMapper;
    }
    
    @Override
    public String selectBldgExistYn(String emdCd) {
    	return rstPrcMapper.selectBldgExistYn(emdCd);
    }
    
    @Override
    public List<RstPrcBldgResultVO> selectBldgList(String emdCd) {
        return rstPrcMapper.selectBldgList(emdCd);
    }

    @Override
    public int selectPrcDetailCount(String ctpv, String sgg, String emd, String mno, String sno, Integer area) {
        return rstPrcMapper.selectPrcDetailCount(ctpv, sgg, emd, mno, sno, area);
    }

    @Override
    public List<RstPrcDetailVO> selectPrcDetail(String ctpv, String sgg, String emd, String mno, String sno, Integer area, int firstIndex, int recordCountPerPage) {
        return rstPrcMapper.selectPrcDetail(ctpv, sgg, emd, mno, sno, area, firstIndex, recordCountPerPage);
    }
    
}
