<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.izouma.weixin.dao.AccessTokenMapper">
	<!-- 目的：为 Dao接口方法提供sql语句配置 -->
	<select id="getAccessToken" resultType="com.izouma.weixin.model.AccessToken" >
		SELECT
			*
		FROM
			sys_access_token
		ORDER BY
			time_stamp DESC
		LIMIT 1
	</select>
	
	<insert id="updateAccessToken" parameterType="map">
	    INSERT INTO sys_access_token (access_token, time_stamp)
		VALUES (#{accessToken}, #{timeStamp})
  	</insert>

</mapper>