25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

97 lines
3.8 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_headImg" 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. </resultMap>
  26. <sql id="allColumns">
  27. `id`,`tenant_id`,`parent_tenant_id`,`total_fee`,`status`,`audio_remark`,`create_date`,`update_date`,`b_user_id`,`phone`,
  28. `wx_b_open_id`,`wx_b_open_headImg`,`audio_date`,`merchant_id`,`merchant_name`,`recive_open_id`,`recive_nick_name`,
  29. `wx_pay_no`,`wx_pay_time`,`fail_remark`
  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 != createDateBegin">
  43. and `create_date` &gt;= #{createDateBegin}
  44. </if>
  45. <if test=" null != createDateEnd">
  46. and `create_date` &lt;= #{createDateEnd}
  47. </if>
  48. <if test=" null != status ">
  49. and `status` = #{status}
  50. </if>
  51. <if test=" null != statusList ">
  52. and status in
  53. <foreach collection="statusList" index="index" item="statusItem" open="(" separator="," close=")">
  54. #{statusItem}
  55. </foreach>
  56. </if>
  57. <if test=" null != ids ">
  58. and id in
  59. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  60. #{idItem}
  61. </foreach>
  62. </if>
  63. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  64. </sql>
  65. <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  66. select <include refid="allColumns" /> from wx_cash_out where id = #{id} and tenant_id=#{tenantId}
  67. </select>
  68. <select id="findList" parameterType="com.iformall.domain.po.WxCashOut" resultMap="BaseResultMap">
  69. select <include refid="allColumns" /> from wx_cash_out
  70. <include refid="dynamicWhereConditions" />
  71. </select>
  72. <update id="updateStatus" parameterType="com.iformall.domain.po.WxCashOut">
  73. update wx_cash_out
  74. set `status` = #{status},
  75. `update_date` = #{updateDate}
  76. where id=#{id}
  77. <if test=" null != tenantId and '' != tenantId">
  78. and `tenant_id` = #{tenantId}
  79. </if>
  80. <if test=" null != parentTenantId and '' != parentTenantId">
  81. and `parent_tenant_id` = #{parentTenantId}
  82. </if>
  83. </update>
  84. </mapper>