<?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.storlead.wecom.mapper.WechatTokenMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.storlead.wecom.pojo.vo.WechatToken">
        <result column="type" property="type" />
        <result column="token" property="token" />
        <result column="expires_in" property="expiresIn" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        type, token, expires_in
    </sql>

    <select id="selectWechatAppsByAppCode" resultType="com.storlead.wecom.pojo.vo.WechatAppBO">
        select app_id as appId,agent_id as agentId,app_secret as appSecret,redirect_url as redirectUrl,home_page as homePage from wechat_apps where app_code = #{appCode} limit 1
    </select>

</mapper>
