package com.bb.dao;

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

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

@Repository("callBackDao")
public class CallBackDaoImpl implements CallBackDao {

	  /** 메인DB 연결 */
    @Autowired @Qualifier("sqlSessionMain")
    protected SqlSession sqlSession;

    /** 서브DB 연결 */
    @Autowired @Qualifier("sqlSessionSub")
    protected SqlSession sqlSessionSub;

	@Override
	public void insertCallBackErrLog(HashMap logParam) {
		sqlSession.insert("insertCallBackErrLog", logParam);

	}

	@Override
	public void insertBetRadarLog(HashMap sData) {
		// TODO Auto-generated method stub
		sqlSession.insert("insertBetRadarLog", sData);
	}

	@Override
	public List<HashMap> getBetRadarLogByBetId(String betId) {
		return sqlSessionSub.selectList("getBetRadarLogByBetId", betId);
	}

}
