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

OrderSnapshotMapper.xml 6.3 KiB

2 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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.OrderSnapshotMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.OrderSnapshot">
  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="order_id" jdbcType="BIGINT" property="orderId" />
  9. <result column="compose_order_id" jdbcType="BIGINT" property="composeOrderId" />
  10. <result column="type" jdbcType="INTEGER" property="type"/>
  11. <result column="cover_img" jdbcType="VARCHAR" property="coverImg"/>
  12. <result column="cover_picture" jdbcType="VARCHAR" property="coverPicture"/>
  13. <result column="detail_picture" jdbcType="VARCHAR" property="detailPicture"/>
  14. <result column="title" jdbcType="VARCHAR" property="title"/>
  15. <result column="sub_title" jdbcType="VARCHAR" property="subTitle"/>
  16. <result column="item_group" jdbcType="VARCHAR" property="itemGroup"/>
  17. <result column="sale_price" jdbcType="INTEGER" property="salePrice"/>
  18. <result column="freight_price" jdbcType="INTEGER" property="freightPrice"/>
  19. <result column="use_price" jdbcType="INTEGER" property="usePrice"/>
  20. <result column="use_limit_rule" jdbcType="INTEGER" property="useLimitRule"/>
  21. <result column="use_limit_quantity" jdbcType="INTEGER" property="useLimitQuantity"/>
  22. <result column="send_type" jdbcType="INTEGER" property="sendType"/>
  23. <result column="valid_type" jdbcType="INTEGER" property="validType"/>
  24. <result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate"/>
  25. <result column="valid_end_date" jdbcType="TIMESTAMP" property="validEndDate"/>
  26. <result column="pick_start_date" jdbcType="TIMESTAMP" property="pickStartDate"/>
  27. <result column="pick_end_date" jdbcType="TIMESTAMP" property="pickEndDate"/>
  28. <result column="valid_days" jdbcType="INTEGER" property="validDays"/>
  29. <result column="detail" jdbcType="VARCHAR" property="detail"/>
  30. <result column="price" jdbcType="INTEGER" property="price"/>
  31. <result column="tail_price" jdbcType="INTEGER" property="tailPrice"/>
  32. <result column="orig_price" jdbcType="INTEGER" property="origPrice"/>
  33. <result column="unit" jdbcType="INTEGER" property="unit"/>
  34. <result column="remark" jdbcType="VARCHAR" property="remark"/>
  35. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  36. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  37. <result column="business" jdbcType="INTEGER" property="business"/>
  38. <result column="sub_business" jdbcType="INTEGER" property="subBusiness"/>
  39. <result column="support_transfer" jdbcType="INTEGER" property="supportTransfer"/>
  40. <result column="subsidy_type" jdbcType="INTEGER" property="subsidyType"/>
  41. <result column="subsidy_num" jdbcType="INTEGER" property="subsidyNum"/>
  42. <result column="press_limit_num" jdbcType="INTEGER" property="pressLimitNum"/>
  43. <result column="press_limit_hours" jdbcType="INTEGER" property="pressLimitHours"/>
  44. <result column="auto_refund" jdbcType="INTEGER" property="autoRefund"/>
  45. <result column="credit_price" jdbcType="INTEGER" property="creditPrice"/>
  46. <result column="credit_refund" jdbcType="INTEGER" property="creditRefund"/>
  47. <result column="conditions" jdbcType="VARCHAR" property="conditions"/>
  48. <result column="password_support" property="passwordSupport"/>
  49. <result column="content_type" property="contentType"/>
  50. <result column="html" property="html"/>
  51. <result column="source_type" jdbcType="INTEGER" property="sourceType"/>
  52. <result column="gift_list" jdbcType="VARCHAR" property="giftList"></result>
  53. <result column="merchant_list" jdbcType="VARCHAR" property="merchantList"></result>
  54. <result column="product_type" jdbcType="INTEGER" property="productType"/>
  55. <result column="category_id" jdbcType="INTEGER" property="categoryId"/>
  56. <result column="product_attrs" jdbcType="VARCHAR" property="productAttrs"/>
  57. <result column="sku_attrs" jdbcType="VARCHAR" property="skuAttrs"/>
  58. </resultMap>
  59. <sql id="allColumns">
  60. `id`,`tenant_id`,`parent_tenant_id`,`order_id`,`compose_order_id`,`type`,`cover_img`,`cover_picture`,`detail_picture`,
  61. `title`,`sub_title`,`item_group`,`sale_price`,`freight_price`,`use_price`,`use_limit_rule`,`use_limit_quantity`,`send_type`,
  62. `valid_type`,`valid_start_date`,`valid_end_date`,pick_start_date,pick_end_date,`valid_days`,`detail`,`price`,tail_price,orig_price,`unit`,
  63. `remark`,`create_date`,`update_date`,`business`,`sub_business`,`support_transfer`,`subsidy_num`,`subsidy_type`,
  64. `press_limit_num`, `press_limit_hours`, `auto_refund`,`credit_price`,`credit_refund`,
  65. `conditions`,content_type,source_type,password_support,gift_list,merchant_list,
  66. product_type,category_id,product_attrs,sku_attrs
  67. </sql>
  68. <sql id="dynamicWhereConditions">
  69. where 1 = 1
  70. <if test=" null != id ">
  71. and `id` = #{id}
  72. </if>
  73. <if test=" null != tenantId and '' != tenantId">
  74. and `tenant_id` = #{tenantId}
  75. </if>
  76. <if test=" null != parentTenantId and '' != parentTenantId">
  77. and `parent_tenant_id` = #{parentTenantId}
  78. </if>
  79. <if test=" null != orderId ">
  80. and `order_id` = #{orderId}
  81. </if>
  82. <if test=" null != composeOrderId ">
  83. and `compose_order_id` = #{composeOrderId}
  84. </if>
  85. <if test=" null != ids ">
  86. and id in
  87. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  88. #{idItem}
  89. </foreach>
  90. </if>
  91. <if test=" null != sortColumns">order by ${sortColumns}</if>
  92. </sql>
  93. <select id="findList" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap">
  94. select
  95. <include refid="allColumns"/>
  96. from order_snapshot
  97. <include refid="dynamicWhereConditions"/>
  98. </select>
  99. </mapper>