后台服务
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

133 rindas
5.2 KiB

  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.PosPayOrderMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.PosPayOrder">
  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="create_time" jdbcType="TIMESTAMP" property="createTime" />
  9. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  10. <result column="order_id" jdbcType="BIGINT" property="orderId" />
  11. <result column="bu_user_id" jdbcType="BIGINT" property="buUserId" />
  12. <result column="type" jdbcType="INTEGER" property="type" />
  13. <result column="pay_from" jdbcType="INTEGER" property="payFrom" />
  14. <result column="pay_amount" jdbcType="INTEGER" property="payAmount" />
  15. <result column="pay_time_start" jdbcType="TIMESTAMP" property="payTimeStart" />
  16. <result column="pay_time_end" jdbcType="TIMESTAMP" property="payTimeEnd" />
  17. <result column="prepay_id" jdbcType="VARCHAR" property="prepayId" />
  18. <result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
  19. <result column="pay_vendor" jdbcType="INTEGER" property="payVendor" />
  20. <result column="pay_order_no" jdbcType="VARCHAR" property="payOrderNo" />
  21. <result column="pay_order_status" jdbcType="INTEGER" property="payOrderStatus" />
  22. <result column="share" jdbcType="INTEGER" property="share" />
  23. <result column="share_amount" jdbcType="INTEGER" property="shareAmount" />
  24. <result column="rate_amount" jdbcType="INTEGER" property="rateAmount" />
  25. <result column="fail_reason" jdbcType="VARCHAR" property="failReason" />
  26. <result column="auth_code" jdbcType="VARCHAR" property="authCode" />
  27. <result column="open_id" jdbcType="VARCHAR" property="openId" />
  28. <result column="pay_end_from" jdbcType="INTEGER" property="payEndFrom" />
  29. </resultMap>
  30. <sql id="allColumns">
  31. `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`order_id`,`bu_user_id`,`type`,`pay_from`,`pay_amount`,`pay_time_start`,`pay_time_end`,`prepay_id`,`transaction_id`,`pay_vendor`,`pay_order_no`,`pay_order_status`,`share`,`share_amount`,`rate_amount`,`fail_reason`,`auth_code`,`open_id`,`pay_end_from`
  32. </sql>
  33. <sql id="dynamicWhereConditions">
  34. where 1 = 1
  35. <if test=" null != id ">
  36. and `id` = #{id}
  37. </if>
  38. <if test=" null != tenantId and '' != tenantId">
  39. and `tenant_id` = #{tenantId}
  40. </if>
  41. <if test=" null != parentTenantId and '' != parentTenantId">
  42. and `parent_tenant_id` = #{parentTenantId}
  43. </if>
  44. <if test=" null != createTime ">
  45. and `create_time` = #{createTime}
  46. </if>
  47. <if test=" null != updateTime ">
  48. and `update_time` = #{updateTime}
  49. </if>
  50. <if test=" null != orderId ">
  51. and `order_id` = #{orderId}
  52. </if>
  53. <if test=" null != buUserId ">
  54. and `bu_user_id` = #{buUserId}
  55. </if>
  56. <if test=" null != type ">
  57. and `type` = #{type}
  58. </if>
  59. <if test=" null != payFrom ">
  60. and `pay_from` = #{payFrom}
  61. </if>
  62. <if test=" null != payAmount ">
  63. and `pay_amount` = #{payAmount}
  64. </if>
  65. <if test=" null != payTimeStart ">
  66. and `pay_time_start` = #{payTimeStart}
  67. </if>
  68. <if test=" null != payTimeEnd ">
  69. and `pay_time_end` = #{payTimeEnd}
  70. </if>
  71. <if test=" null != prepayId ">
  72. and `prepay_id` like concat('%', #{prepayId},'%')
  73. </if>
  74. <if test=" null != transactionId ">
  75. and `transaction_id` like concat('%', #{transactionId},'%')
  76. </if>
  77. <if test=" null != payVendor ">
  78. and `pay_vendor` = #{payVendor}
  79. </if>
  80. <if test=" null != payOrderNo ">
  81. and `pay_order_no` like concat('%', #{payOrderNo},'%')
  82. </if>
  83. <if test=" null != payOrderStatus ">
  84. and `pay_order_status` = #{payOrderStatus}
  85. </if>
  86. <if test=" null != share ">
  87. and `share` = #{share}
  88. </if>
  89. <if test=" null != shareAmount ">
  90. and `share_amount` = #{shareAmount}
  91. </if>
  92. <if test=" null != rateAmount ">
  93. and `rate_amount` = #{rateAmount}
  94. </if>
  95. <if test=" null != failReason ">
  96. and `fail_reason` like concat('%', #{failReason},'%')
  97. </if>
  98. <if test=" null != authCode ">
  99. and `auth_code` like concat('%', #{authCode},'%')
  100. </if>
  101. <if test=" null != openId ">
  102. and `open_id` like concat('%', #{openId},'%')
  103. </if>
  104. <if test=" null != payEndFrom ">
  105. and `pay_end_from` = #{payEndFrom}
  106. </if>
  107. <if test=" null != ids ">
  108. and id in
  109. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  110. #{idItem}
  111. </foreach>
  112. </if>
  113. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  114. </sql>
  115. <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  116. select <include refid="allColumns" /> from pos_pay_order where id =#{id} and tenant_id = #{tenantId}
  117. </select>
  118. <select id="findList" parameterType="com.iformall.domain.po.PosPayOrder" resultMap="BaseResultMap">
  119. select <include refid="allColumns" /> from pos_pay_order
  120. <include refid="dynamicWhereConditions" />
  121. </select>
  122. </mapper>