You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

94 lines
3.7 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="updateDate" />
  14. <result column="wx_b_open_id" jdbcType="VARCHAR" property="updateDate" />
  15. <result column="audio_date" jdbcType="TIMESTAMP" property="updateDate" />
  16. <result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
  17. <result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
  18. <result column="recive_open_id" jdbcType="VARCHAR" property="reciveOpenId" />
  19. <result column="recive_nick_name" jdbcType="VARCHAR" property="reciveNickName" />
  20. <result column="wx_pay_no" jdbcType="VARCHAR" property="wxPayNo" />
  21. <result column="wx_pay_time" jdbcType="VARCHAR" property="wxPayTime" />
  22. <result column="fail_remark" jdbcType="VARCHAR" property="failRemark" />
  23. </resultMap>
  24. <sql id="allColumns">
  25. `id`,`tenant_id`,`parent_tenant_id`,`total_fee`,`status`,`audio_remark`,`create_date`,`update_date`,`b_user_id`,`wx_b_open_id`,`audio_date`,
  26. `merchant_id`,`merchant_name`,`recive_open_id`,`recive_nick_name`,`wx_pay_no`,`wx_pay_time`,`fail_remark`
  27. </sql>
  28. <sql id="dynamicWhereConditions">
  29. where 1 = 1
  30. <if test=" null != id ">
  31. and `id` = #{id}
  32. </if>
  33. <if test=" null != tenantId and '' != tenantId">
  34. and `tenant_id` = #{tenantId}
  35. </if>
  36. <if test=" null != parentTenantId and '' != parentTenantId">
  37. and `parent_tenant_id` = #{parentTenantId}
  38. </if>
  39. <if test=" null != createDateBegin">
  40. and `create_date` &gt;= #{createDateBegin}
  41. </if>
  42. <if test=" null != createDateEnd">
  43. and `create_date` &lt;= #{createDateEnd}
  44. </if>
  45. <if test=" null != status ">
  46. and `status` = #{status}
  47. </if>
  48. <if test=" null != statusList ">
  49. and status in
  50. <foreach collection="statusList" index="index" item="statusItem" open="(" separator="," close=")">
  51. #{statusItem}
  52. </foreach>
  53. </if>
  54. <if test=" null != ids ">
  55. and id in
  56. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  57. #{idItem}
  58. </foreach>
  59. </if>
  60. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  61. </sql>
  62. <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  63. select <include refid="allColumns" /> from wx_cash_out where id = #{id} and tenant_id=#{tenantId}
  64. </select>
  65. <select id="findList" parameterType="com.iformall.domain.po.WxCashOut" resultMap="BaseResultMap">
  66. select <include refid="allColumns" /> from wx_cash_out
  67. <include refid="dynamicWhereConditions" />
  68. </select>
  69. <update id="updateStatus" parameterType="com.iformall.domain.po.WxCashOut">
  70. update wx_cash_out
  71. set `status` = #{status},
  72. `update_date` = #{updateDate}
  73. where id=#{id}
  74. <if test=" null != tenantId and '' != tenantId">
  75. and `tenant_id` = #{tenantId}
  76. </if>
  77. <if test=" null != parentTenantId and '' != parentTenantId">
  78. and `parent_tenant_id` = #{parentTenantId}
  79. </if>
  80. </update>
  81. </mapper>