后台服务
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

108 righe
4.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.WxSubsidyMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxSubsidy">
  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="operator_user_id" jdbcType="VARCHAR" property="operatorUserId" />
  9. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  10. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  11. <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
  12. <result column="body" jdbcType="VARCHAR" property="body" />
  13. <result column="ip" jdbcType="VARCHAR" property="ip" />
  14. <result column="status" jdbcType="INTEGER" property="status" />
  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="code_url" jdbcType="VARCHAR" property="codeUrl" />
  19. <result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
  20. <result column="amount" jdbcType="INTEGER" property="amount" />
  21. <result column="share_amount" jdbcType="INTEGER" property="shareAmount" />
  22. <result column="share_remain_amount" jdbcType="INTEGER" property="shareRemainAmount" />
  23. <result column="fail_reason" jdbcType="VARCHAR" property="failReason" />
  24. <result column="open_id" jdbcType="VARCHAR" property="openId" />
  25. </resultMap>
  26. <sql id="allColumns">
  27. `id`,`tenant_id`,`parent_tenant_id`,`operator_user_id`,`create_time`,`update_time`,`order_no`,`body`,`total_fee`,`ip`,`status`,
  28. `pay_time_start`,`pay_time_end`,`prepay_id`,`code_url`,`transaction_id`,`amount`,`share_amount`,`share_remain_amount`,`fail_reason`,`open_id`
  29. </sql>
  30. <sql id="dynamicWhereConditions">
  31. where 1 = 1
  32. <if test=" null != id ">
  33. and `id` = #{id}
  34. </if>
  35. <if test=" null != tenantId and '' != tenantId">
  36. and `tenant_id` = #{tenantId}
  37. </if>
  38. <if test=" null != parentTenantId and '' != parentTenantId">
  39. and `parent_tenant_id` = #{parentTenantId}
  40. </if>
  41. <if test=" null != createTime ">
  42. and `create_time` = #{createTime}
  43. </if>
  44. <if test=" null != updateTime ">
  45. and `update_time` = #{updateTime}
  46. </if>
  47. <if test=" null != orderNo ">
  48. and `order_no` like concat('%', #{orderNo},'%')
  49. </if>
  50. <if test=" null != body ">
  51. and `body` like concat('%', #{body},'%')
  52. </if>
  53. <if test=" null != ip ">
  54. and `ip` like concat('%', #{ip},'%')
  55. </if>
  56. <if test=" null != status ">
  57. and `status` = #{status}
  58. </if>
  59. <if test=" null != payTimeStart ">
  60. and `pay_time_start` = #{payTimeStart}
  61. </if>
  62. <if test=" null != payTimeEnd ">
  63. and `pay_time_end` = #{payTimeEnd}
  64. </if>
  65. <if test=" null != prepayId ">
  66. and `prepay_id` like concat('%', #{prepayId},'%')
  67. </if>
  68. <if test=" null != codeUrl ">
  69. and `code_url` like concat('%', #{codeUrl},'%')
  70. </if>
  71. <if test=" null != transactionId ">
  72. and `transaction_id` like concat('%', #{transactionId},'%')
  73. </if>
  74. <if test=" null != amount ">
  75. and `amount` = #{amount}
  76. </if>
  77. <if test=" null != shareAmount ">
  78. and `share_amount` = #{shareAmount}
  79. </if>
  80. <if test=" null != shareRemainAmount ">
  81. and `share_remain_amount` = #{shareRemainAmount}
  82. </if>
  83. <if test=" null != failReason ">
  84. and `fail_reason` like concat('%', #{failReason},'%')
  85. </if>
  86. <if test=" null != ids ">
  87. and id in
  88. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  89. #{idItem}
  90. </foreach>
  91. </if>
  92. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  93. </sql>
  94. <select id="findList" parameterType="com.iformall.domain.po.WxSubsidy" resultMap="BaseResultMap">
  95. select <include refid="allColumns" /> from wx_subsidy
  96. <include refid="dynamicWhereConditions" />
  97. </select>
  98. </mapper>