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

85 строки
3.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.WxOfflineActivityItemMapper">
  6. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxOfflineActivityItem">
  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="activityId" column="activity_id" jdbcType="BIGINT"/>
  11. <result property="type" column="type" jdbcType="SMALLINT"/>
  12. <result property="name" column="name" jdbcType="VARCHAR"/>
  13. <result property="limitMoney" column="limit_money" jdbcType="DECIMAL"/>
  14. <result property="awardsItemPrice" column="awards_item_price" jdbcType="DECIMAL"/>
  15. <result property="awardsItemLimit" column="awards_item_limit" jdbcType="INTEGER"/>
  16. <result property="awardsItemCount" column="awards_item_count" jdbcType="INTEGER"/>
  17. <result property="awardsItemRule" column="awards_item_rule" jdbcType="SMALLINT"/>
  18. <result property="calculationMode" column="calculation_mode" jdbcType="SMALLINT"/>
  19. <result property="maxAmount" column="max_amount" jdbcType="DECIMAL"/>
  20. <result property="startingTaxPoint" column="starting_tax_point" jdbcType="DECIMAL"/>
  21. <result property="taxPoints" column="tax_points" jdbcType="DECIMAL"/>
  22. <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
  23. <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
  24. </resultMap>
  25. <sql id="allColumns">
  26. id,tenant_id,parent_tenant_id,
  27. activity_id,`type`,`name`,
  28. limit_money,awards_item_price,awards_item_limit,awards_item_count,
  29. awards_item_rule,create_date,update_date
  30. </sql>
  31. <sql id="dynamicWhereConditions">
  32. where 1 = 1
  33. <if test=" null != id ">
  34. and `id` = #{id}
  35. </if>
  36. <if test=" null != tenantId and '' != tenantId">
  37. and `tenant_id` = #{tenantId}
  38. </if>
  39. <if test=" null != parentTenantId and '' != parentTenantId">
  40. and `parent_tenant_id` = #{parentTenantId}
  41. </if>
  42. <if test=" null != activityId ">
  43. and `activity_id` = #{activityId}
  44. </if>
  45. <if test=" null != name and name != '' ">
  46. and `name` like concat('%', #{name},'%')
  47. </if>
  48. <if test=" null != ids ">
  49. and id in
  50. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  51. #{idItem}
  52. </foreach>
  53. </if>
  54. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  55. </sql>
  56. <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  57. select <include refid="allColumns" /> from wx_offline_activity_item where id = #{id} and tenant_id=#{tenantId}
  58. </select>
  59. <select id="findList" parameterType="com.iformall.domain.po.WxOfflineActivityItem" resultMap="BaseResultMap">
  60. select <include refid="allColumns" /> from wx_offline_activity_item
  61. <include refid="dynamicWhereConditions" />
  62. </select>
  63. <select id="findIds" parameterType="com.iformall.domain.po.WxOfflineActivityItem" resultType="Long">
  64. select id from wx_offline_activity_item
  65. <include refid="dynamicWhereConditions" />
  66. </select>
  67. <delete id="delete" parameterType="com.iformall.domain.po.WxOfflineActivityItem">
  68. delete from wx_offline_activity_item
  69. <include refid="dynamicWhereConditions" />
  70. </delete>
  71. </mapper>