Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 

58 wiersze
2.8 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.iformall.mapper.WxVtwoSpecialTopicActivityMapper">
  6. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoSpecialTopicActivity">
  7. <id property="id" column="id" jdbcType="BIGINT"/>
  8. <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/>
  9. <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/>
  10. <result property="specialTopicId" column="special_topic_id" jdbcType="BIGINT"/>
  11. <result property="activityId" column="activity_id" jdbcType="BIGINT"/>
  12. <result property="activityType" column="activity_type" jdbcType="SMALLINT"/>
  13. <result property="activityName" column="activity_name" jdbcType="VARCHAR"/>
  14. <result property="activityCreateDate" column="activity_create_date" jdbcType="TIMESTAMP"/>
  15. <result property="activityStartTime" column="activity_start_time" jdbcType="TIMESTAMP"/>
  16. <result property="activityEndTime" column="activity_end_time" jdbcType="TIMESTAMP"/>
  17. <result property="activityStatus" column="activity_status" jdbcType="SMALLINT"/>
  18. <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
  19. <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
  20. </resultMap>
  21. <sql id="allColumns">
  22. id,tenant_id,parent_tenant_id,
  23. special_topic_id,activity_id,activity_type,
  24. activity_name,activity_create_date,activity_start_time,
  25. activity_end_time,activity_status,create_date,
  26. update_date
  27. </sql>
  28. <sql id="dynamicWhereConditions">
  29. where 1 = 1
  30. <if test=" null != id ">
  31. and `id` = #{id}
  32. </if>
  33. <if test=" null != tenantId and '' != tenantId">
  34. and `tenant_id` = #{tenantId}
  35. </if>
  36. <if test=" null != parentTenantId and '' != parentTenantId">
  37. and `parent_tenant_id` = #{parentTenantId}
  38. </if>
  39. <if test=" null != specialTopicId ">
  40. and `special_topic_id` = #{specialTopicId}
  41. </if>
  42. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  43. </sql>
  44. <select id="findList" parameterType="com.iformall.domain.po.WxVtwoSpecialTopicActivity" resultMap="BaseResultMap">
  45. select <include refid="allColumns" /> from wx_vtwo_special_topic_activity
  46. <include refid="dynamicWhereConditions" />
  47. </select>
  48. <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  49. select <include refid="allColumns" /> from wx_vtwo_special_topic_activity
  50. where id = #{id} and tenant_id=#{tenantId}
  51. </select>
  52. </mapper>