package cn.bsystem.Test.dao;

import cn.bsystem.ptuserrole.model.PtyhBean;
import com.ibatis.sqlmap.client.SqlMapClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

import javax.annotation.PostConstruct;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

@Repository("loginFrameDao")
public class LoginFrameDAO  extends SqlMapClientDaoSupport {
    @Autowired
    private SqlMapClient sqlMapClient;
    
    @PostConstruct
    public  void initSqlMapClient(){
        super.setSqlMapClient(sqlMapClient);
    }


    /***
     * 查询登录用户信息
     * @throws SQLException
     */
    public PtyhBean login(Map map) throws SQLException{
        return (PtyhBean) this.getSqlMapClient().queryForObject("login", map);
    }


}
