后台服务
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

131 linhas
5.0 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.WxPayBillMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxPayBill">
  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="bill_id" jdbcType="BIGINT" property="billId"/>
  11. <result column="b_user_id" jdbcType="BIGINT" property="bUserId"/>
  12. <result column="ip" jdbcType="VARCHAR" property="ip"/>
  13. <result column="pay_amount" jdbcType="INTEGER" property="payAmount"/>
  14. <result column="pay_time_start" jdbcType="TIMESTAMP" property="payTimeStart"/>
  15. <result column="pay_time_end" jdbcType="TIMESTAMP" property="payTimeEnd"/>
  16. <result column="prepay_id" jdbcType="VARCHAR" property="prepayId"/>
  17. <result column="transaction_id" jdbcType="VARCHAR" property="transactionId"/>
  18. <result column="pay_vendor" jdbcType="INTEGER" property="payVendor"/>
  19. <result column="pay_bill_no" jdbcType="VARCHAR" property="payBillNo"/>
  20. <result column="pay_bill_status" jdbcType="INTEGER" property="payBillStatus"/>
  21. <result column="share" jdbcType="INTEGER" property="share"/>
  22. <result column="share_amount" jdbcType="INTEGER" property="shareAmount"/>
  23. <result column="fail_reason" jdbcType="VARCHAR" property="failReason"/>
  24. <result column="open_id" jdbcType="VARCHAR" property="openId"/>
  25. <result column="bill_type_value" jdbcType="VARCHAR" property="billTypeValue"/>
  26. </resultMap>
  27. <sql id="allColumns">
  28. `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`bill_id`,`b_user_id`,`ip`,`pay_amount`,`pay_time_start`,`pay_time_end`,`prepay_id`,`transaction_id`,`pay_vendor`,
  29. `pay_bill_no`,`pay_bill_status`,`share`,`share_amount`,`fail_reason`,`open_id`,`bill_type_value`
  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 != createTime ">
  43. and `create_time` = #{createTime}
  44. </if>
  45. <if test=" null != updateTime ">
  46. and `update_time` = #{updateTime}
  47. </if>
  48. <if test=" null != billId ">
  49. and `bill_id` = #{billId}
  50. </if>
  51. <if test=" null != bUserId ">
  52. and `b_user_id` = #{bUserId}
  53. </if>
  54. <if test=" null != ip ">
  55. and `ip` like concat('%', #{ip},'%')
  56. </if>
  57. <if test=" null != payAmount ">
  58. and `pay_amount` = #{payAmount}
  59. </if>
  60. <if test=" null != payTimeStart ">
  61. and `pay_time_start` = #{payTimeStart}
  62. </if>
  63. <if test=" null != payTimeEnd ">
  64. and `pay_time_end` = #{payTimeEnd}
  65. </if>
  66. <if test=" null != prepayId ">
  67. and `prepay_d` like concat('%', #{prepayId},'%')
  68. </if>
  69. <if test=" null != transactionId ">
  70. and `transaction_id` like concat('%', #{transactionId},'%')
  71. </if>
  72. <if test=" null != payVendor ">
  73. and `pay_vendor` = #{payVendor}
  74. </if>
  75. <if test=" null != billTypeValue ">
  76. and `bill_type_value` = #{billTypeValue}
  77. </if>
  78. <if test=" null != payBillNo ">
  79. and `pay_bill_no` like concat('%', #{payBillNo},'%')
  80. </if>
  81. <if test=" null != payBillStatus ">
  82. and `pay_bill_status` = #{payBillStatus}
  83. </if>
  84. <if test=" null != share ">
  85. and `share` = #{share}
  86. </if>
  87. <if test=" null != shareAmount ">
  88. and `share_amount` = #{shareAmount}
  89. </if>
  90. <if test=" null != failReason ">
  91. and `fail_reason` like concat('%', #{failReason},'%')
  92. </if>
  93. <if test=" null != openId ">
  94. and `open_id` = #{openId}
  95. </if>
  96. <if test=" null != ids ">
  97. and id in
  98. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  99. #{idItem}
  100. </foreach>
  101. </if>
  102. <if test=" null != sortColumns">order by ${sortColumns}</if>
  103. </sql>
  104. <select id="findList" parameterType="com.iformall.domain.po.WxPayBill" resultMap="BaseResultMap">
  105. select
  106. <include refid="allColumns"/>
  107. from wx_pay_bill
  108. <include refid="dynamicWhereConditions"/>
  109. </select>
  110. </mapper>