后台服务
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

WxTemplateMsgMapper.xml 3.1 KiB

2 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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.iformall.mapper.WxTemplateMsgMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxTemplateMsg">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
  8. <result column="template_id" jdbcType="VARCHAR" property="templateId"/>
  9. <result column="custom_param" jdbcType="VARCHAR" property="customParam"/>
  10. <result column="type" jdbcType="INTEGER" property="type"/>
  11. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  12. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  13. <result column="on_off" jdbcType="INTEGER" property="onOff"/>
  14. </resultMap>
  15. <sql id="allColumns">
  16. `id`,`tenant_id`,`parent_tenant_id`,`template_id`,`type`,`custom_param`,`create_date`,`update_date`,`on_off`
  17. </sql>
  18. <sql id="dynamicWhereConditions">
  19. where 1 = 1
  20. <if test=" null != id ">
  21. and `id` = #{id}
  22. </if>
  23. <if test=" null != tenantId and '' != tenantId">
  24. and `tenant_id` = #{tenantId}
  25. </if>
  26. <if test=" null != parentTenantId and '' != parentTenantId">
  27. and `parent_tenant_id` = #{parentTenantId}
  28. </if>
  29. <if test=" null != templateId ">
  30. and `template_id` = #{templateId}
  31. </if>
  32. <if test=" null != type ">
  33. and `type` = #{type}
  34. </if>
  35. <if test=" null != createDate ">
  36. and `create_date` = #{createDate}
  37. </if>
  38. <if test=" null != updateDate ">
  39. and `update_date` = #{updateDate}
  40. </if>
  41. <if test=" null != onOff ">
  42. and `on_off` = #{onOff}
  43. </if>
  44. <if test=" isc ">
  45. and `template_id` is not null and `template_id` &lt;&gt; ''
  46. </if>
  47. <if test=" null != types ">
  48. and `type` in
  49. <foreach collection="types" index="index" item="item" open="(" separator="," close=")">
  50. #{item}
  51. </foreach>
  52. </if>
  53. <if test=" null != ids ">
  54. and id in
  55. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  56. #{idItem}
  57. </foreach>
  58. </if>
  59. <if test=" null != sortColumns">order by ${sortColumns}</if>
  60. </sql>
  61. <select id="findList" parameterType="com.iformall.domain.po.WxTemplateMsg" resultMap="BaseResultMap">
  62. select
  63. <include refid="allColumns"/>
  64. from wx_template_msg
  65. <include refid="dynamicWhereConditions"/>
  66. </select>
  67. <select id="findListForMiniApp" parameterType="com.iformall.domain.po.WxTemplateMsg" resultMap="BaseResultMap">
  68. select
  69. <include refid="allColumns"/>
  70. from wx_template_msg
  71. <include refid="dynamicWhereConditions"/>
  72. </select>
  73. </mapper>