package jj.tech.paolu.biz.demo.dao;

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

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.type.JdbcType;
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
import org.mybatis.dynamic.sql.util.SqlProviderAdapter;

@Mapper
public interface UserDao {
	
	@Results( value = {
		@Result(column="ID", property="id", jdbcType=JdbcType.BIGINT, id=true),
		@Result(column="REAL_NAME", property="realName", jdbcType=JdbcType.VARCHAR),
		@Result(column="USER_NAME", property="userName", jdbcType=JdbcType.VARCHAR),
		@Result(column="PASSWORD", property="password", jdbcType=JdbcType.VARCHAR),
		@Result(column="HEAD_IMG", property="headImg", jdbcType=JdbcType.VARCHAR)
	})
	@SelectProvider(type=SqlProviderAdapter.class, method="select")
	List<HashMap<Object,Object>> selectSome (SelectStatementProvider selectStatement);
	
}
