package com.madeu.dao.mobile.mobilesystem;

import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Slf4j
@Repository
public class MobileSystemSqlMapDAO extends SqlSessionDaoSupport{

	@Autowired
	private SqlSessionTemplate sqlSessionTemplate;

	@PostConstruct
	void init() {
		setSqlSessionTemplate(sqlSessionTemplate);
	}
	
	/**
	 * 시스템 버전 정보를 가지고 온다. 
	 * store_type, phone_type
	 * 
	 * @param map
	 * @return
	 * @throws Exception 
	 */
	public List<Map<String, Object>> selectSystemVersion(HashMap<String, Object> map)
			throws Exception {
		log.debug("MobileSystemSqlMapDAO selectSystemVersion START");
		String sqlId = "MobileSystem.selectSystemVersion";
		log.debug("MobileSystemSqlMapDAO selectSystemVersion END");
		return getSqlSession().selectList(sqlId, map);
	}
	
}
