<?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="cn.freemud.manager.dao.PartnerDao">

    <sql id="all_column">
         id,
         partner_id as partnerId,
         msappid as msappId,
         partner_name as partnerName,
         mobile as mobile,
         gmt_created as gmtCreated,
         gmt_modified as gmtModified
    </sql>

    <select id="selectByPartnerId" resultType="cn.freemud.entities.db.Partner">
        SELECT
        <include refid="all_column"/>
        FROM partner WHERE partner_id=#{partnerId}
    </select>
</mapper>