WechatTemplateMapper.xml 1.08 KB
<?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.yoho.message.dal.IWechatTemplateDao" >
  <resultMap id="BaseResultMap" type="com.yoho.message.dal.model.WechatTemplate" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="yh_template_type" property="yhTemplateType" jdbcType="VARCHAR" />
    <result column="wechat_temp_id" property="wechatTempId" jdbcType="VARCHAR" />
    <result column="url" property="url" jdbcType="VARCHAR" />
    <result column="topcolor" property="topcolor" jdbcType="VARCHAR" />
    <result column="columns" property="columns" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, yh_template_type, wechat_temp_id, url, topcolor, columns
  </sql>
  <select id="selectByYhTemplateType" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from wechat_template
    where yh_template_type = #{type,jdbcType=VARCHAR} limit 1
  </select>
</mapper>