選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 

95 行
4.4 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.WxVtwoActivityGrantAwardMapper">
  6. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoActivityGrantAward">
  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="activityName" column="activity_name" jdbcType="VARCHAR"/>
  12. <result property="grantId" column="grant_id" jdbcType="BIGINT"/>
  13. <result property="orderId" column="order_id" jdbcType="BIGINT"/>
  14. <result property="orderAmount" column="order_amount" jdbcType="DECIMAL"/>
  15. <result property="modeType" column="mode_type" jdbcType="SMALLINT"/>
  16. <result property="minAmount" column="min_amount" jdbcType="DECIMAL"/>
  17. <result property="maxAmount" column="max_amount" jdbcType="DECIMAL"/>
  18. <result property="relatedCount" column="related_count" jdbcType="INTEGER"/>
  19. <result property="awardId" column="award_id" jdbcType="BIGINT"/>
  20. <result property="awardGrade" column="award_grade" jdbcType="INTEGER"/>
  21. <result property="awardName" column="award_name" jdbcType="VARCHAR"/>
  22. <result property="awardPrice" column="award_price" jdbcType="DECIMAL"/>
  23. <result property="awardCount" column="award_count" jdbcType="INTEGER"/>
  24. <result property="grantPrice" column="grant_price" jdbcType="DECIMAL"/>
  25. <result property="moneyRule" column="money_rule" jdbcType="SMALLINT"/>
  26. <result property="mallShareRate" column="mall_share_rate" jdbcType="DECIMAL"/>
  27. <result property="merchantShareRate" column="merchant_share_rate" jdbcType="DECIMAL"/>
  28. <result property="status" column="status" jdbcType="SMALLINT"/>
  29. <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
  30. <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
  31. </resultMap>
  32. <sql id="allColumns">
  33. id,tenant_id,parent_tenant_id,
  34. activity_id,activity_name,grant_id,
  35. order_id,order_amount,mode_type,
  36. min_amount,max_amount,related_count,
  37. award_id,award_grade,award_name,
  38. award_price,award_count,grant_price,
  39. money_rule,mall_share_rate,merchant_share_rate,
  40. status,create_date,update_date
  41. </sql>
  42. <sql id="dynamicWhereConditions">
  43. where 1 = 1
  44. <if test=" null != id ">
  45. and `id` = #{id}
  46. </if>
  47. <if test=" null != tenantId and '' != tenantId">
  48. and `tenant_id` = #{tenantId}
  49. </if>
  50. <if test=" null != parentTenantId and '' != parentTenantId">
  51. and `parent_tenant_id` = #{parentTenantId}
  52. </if>
  53. <if test=" null != activityId ">
  54. and `activity_id` = #{activityId}
  55. </if>
  56. <if test=" null != orderId ">
  57. and `order_id` = #{orderId}
  58. </if>
  59. <if test=" null != grantId ">
  60. and `grant_id` = #{grantId}
  61. </if>
  62. <if test=" null != modeType ">
  63. and `mode_type` = #{modeType}
  64. </if>
  65. <if test=" null != awardId ">
  66. and `award_id` = #{awardId}
  67. </if>
  68. <if test=" null != status ">
  69. and `status` = #{status}
  70. </if>
  71. <if test=" null != ids ">
  72. and id in
  73. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  74. #{idItem}
  75. </foreach>
  76. </if>
  77. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  78. </sql>
  79. <select id="findList" parameterType="com.iformall.domain.po.WxVtwoActivityGrantAward" resultMap="BaseResultMap">
  80. select <include refid="allColumns" /> from wx_vtwo_activity_grant_award
  81. <include refid="dynamicWhereConditions" />
  82. </select>
  83. <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  84. select <include refid="allColumns" /> from wx_vtwo_activity_grant_award
  85. where id = #{id} and tenant_id=#{tenantId}
  86. </select>
  87. </mapper>