GzhNewsTemplateMapper.xml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.platform.yijia.dao.GzhNewsTemplateMapper">
  4. <!--公众号消息模板返回结果-->
  5. <resultMap id="BaseResultMap" type="com.platform.yijia.pojo.GzhNewsTemplate">
  6. <id column="id" jdbcType="INTEGER" property="id" />
  7. <result column="template_name" jdbcType="VARCHAR" property="templateName" />
  8. <result column="template_type" jdbcType="VARCHAR" property="templateType" />
  9. <result column="temlate_id" jdbcType="VARCHAR" property="templateId" />
  10. <result column="station_id" jdbcType="INTEGER" property="stationId" />
  11. <result column="app_id" jdbcType="INTEGER" property="appId" />
  12. </resultMap>
  13. <!--查询公众号消息模板规则信息-->
  14. <select id="getGzhNewsTemplate" resultMap="BaseResultMap" parameterType="com.platform.yijia.pojo.GzhNewsTemplate">
  15. SELECT
  16. T1.id,
  17. T1.template_name,
  18. T1.template_type,
  19. T1.temlate_id,
  20. T1.station_id,
  21. T1.app_id
  22. FROM
  23. gzh_news_template AS T1
  24. <where>
  25. <if test="stationId !=null and stationId !=''">
  26. T1.station_id = #{stationId}
  27. </if>
  28. <if test="templateType !=null and templateType !=''">
  29. AND T1.template_type = #{templateType}
  30. </if>
  31. </where>
  32. </select>
  33. </mapper>