后台服务
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

119 wiersze
4.5 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.WxCashOutMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCashOut">
  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="total_fee" jdbcType="INTEGER" property="totalFee" />
  9. <result column="status" jdbcType="INTEGER" property="status" />
  10. <result column="audio_remark" jdbcType="VARCHAR" property="audioRemark" />
  11. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  12. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
  13. <result column="b_user_id" jdbcType="BIGINT" property="bUserId" />
  14. <result column="phone" jdbcType="VARCHAR" property="phone" />
  15. <result column="wx_b_open_id" jdbcType="VARCHAR" property="wxBOpenId" />
  16. <result column="wx_b_open_head_img" jdbcType="VARCHAR" property="wxBOpenHeadImg" />
  17. <result column="audio_date" jdbcType="TIMESTAMP" property="audioDate" />
  18. <result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
  19. <result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
  20. <result column="recive_open_id" jdbcType="VARCHAR" property="reciveOpenId" />
  21. <result column="recive_nick_name" jdbcType="VARCHAR" property="reciveNickName" />
  22. <result column="wx_pay_no" jdbcType="VARCHAR" property="wxPayNo" />
  23. <result column="wx_pay_time" jdbcType="VARCHAR" property="wxPayTime" />
  24. <result column="fail_remark" jdbcType="VARCHAR" property="failRemark" />
  25. <result column="real_name" jdbcType="VARCHAR" property="realName" />
  26. </resultMap>
  27. <sql id="allColumns">
  28. `id`,`tenant_id`,`parent_tenant_id`,`total_fee`,`status`,`audio_remark`,`create_date`,`update_date`,`b_user_id`,`phone`,
  29. `wx_b_open_id`,`wx_b_open_head_img`,`audio_date`,`merchant_id`,`merchant_name`,`recive_open_id`,`recive_nick_name`,
  30. `wx_pay_no`,`wx_pay_time`,`fail_remark`,`real_name`
  31. </sql>
  32. <sql id="dynamicWhereConditions">
  33. where 1 = 1
  34. <if test=" null != id ">
  35. and `id` = #{id}
  36. </if>
  37. <if test=" null != tenantId and '' != tenantId">
  38. and `tenant_id` = #{tenantId}
  39. </if>
  40. <if test=" null != parentTenantId and '' != parentTenantId">
  41. and `parent_tenant_id` = #{parentTenantId}
  42. </if>
  43. <if test=" null != createDateBegin">
  44. and `create_date` &gt;= #{createDateBegin}
  45. </if>
  46. <if test=" null != createDateEnd">
  47. and `create_date` &lt;= #{createDateEnd}
  48. </if>
  49. <if test=" null != merchantId">
  50. and `merchant_id` = #{merchantId}
  51. </if>
  52. <if test=" null != merchantName ">
  53. and `merchant_name` like concat('%', #{merchantName},'%')
  54. </if>
  55. <if test=" null != realName ">
  56. and `real_name` like concat('%', #{realName},'%')
  57. </if>
  58. <if test=" null != status ">
  59. and `status` = #{status}
  60. </if>
  61. <if test=" null != statusList ">
  62. and status in
  63. <foreach collection="statusList" index="index" item="statusItem" open="(" separator="," close=")">
  64. #{statusItem}
  65. </foreach>
  66. </if>
  67. <if test=" null != ids ">
  68. and id in
  69. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  70. #{idItem}
  71. </foreach>
  72. </if>
  73. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  74. </sql>
  75. <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  76. select <include refid="allColumns" /> from wx_cash_out where id = #{id} and tenant_id=#{tenantId}
  77. </select>
  78. <select id="findList" parameterType="com.iformall.domain.po.WxCashOut" resultMap="BaseResultMap">
  79. select <include refid="allColumns" /> from wx_cash_out
  80. <include refid="dynamicWhereConditions" />
  81. </select>
  82. <update id="updateStatus" parameterType="com.iformall.domain.po.WxCashOut">
  83. update wx_cash_out
  84. set `status` = #{status},
  85. <if test=" null != failRemark and '' != failRemark">
  86. `fail_remark` = #{failRemark},
  87. </if>
  88. <if test=" null != audioRemark and '' != audioRemark">
  89. `audio_remark` = #{audioRemark},
  90. </if>
  91. <if test=" null != audioDate">
  92. `audio_date` = #{audioDate},
  93. </if>
  94. `update_date` = #{updateDate}
  95. where id=#{id}
  96. <if test=" null != tenantId and '' != tenantId">
  97. and `tenant_id` = #{tenantId}
  98. </if>
  99. <if test=" null != parentTenantId and '' != parentTenantId">
  100. and `parent_tenant_id` = #{parentTenantId}
  101. </if>
  102. </update>
  103. </mapper>