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.
 
 
 
 
 

105 lines
3.3 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.WxProfitSharingResultMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxProfitSharingResult">
  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="merchant_id" jdbcType="BIGINT" property="merchantId" />
  9. <result column="sharing_order_id" jdbcType="BIGINT" property="sharingOrderId" />
  10. <result column="sharing_receiver_id" jdbcType="BIGINT" property="sharingReceiverId" />
  11. <result column="pay_amount" jdbcType="INTEGER" property="payAmount" />
  12. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  13. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  14. <result column="sharing_status" jdbcType="INTEGER" property="sharingStatus" />
  15. <result column="finish_time" jdbcType="VARCHAR" property="finishTime" />
  16. <result column="failed_reason" jdbcType="VARCHAR" property="failedReason" />
  17. <result column="description" jdbcType="VARCHAR" property="description" />
  18. </resultMap>
  19. <sql id="allColumns">
  20. `id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`sharing_order_id`,`sharing_receiver_id`,`pay_amount`,`update_time`,`create_time`,`sharing_status`,`finish_time`,`failed_reason`,`description`
  21. </sql>
  22. <sql id="dynamicWhereConditions">
  23. where 1 = 1
  24. <if test=" null != id ">
  25. and `id` = #{id}
  26. </if>
  27. <if test=" null != tenantId and '' != tenantId">
  28. and `tenant_id` = #{tenantId}
  29. </if>
  30. <if test=" null != parentTenantId and '' != parentTenantId">
  31. and `parent_tenant_id` = #{parentTenantId}
  32. </if>
  33. <if test=" null != merchantId ">
  34. and `merchant_id` = #{merchantId}
  35. </if>
  36. <if test=" null != sharingOrderId ">
  37. and `sharing_order_id` = #{sharingOrderId}
  38. </if>
  39. <if test=" null != sharingReceiverId ">
  40. and `sharing_receiver_id` = #{sharingReceiverId}
  41. </if>
  42. <if test=" null != payAmount ">
  43. and `pay_amount` = #{payAmount}
  44. </if>
  45. <if test=" null != updateTime ">
  46. and `update_time` = #{updateTime}
  47. </if>
  48. <if test=" null != createTime ">
  49. and `create_time` = #{createTime}
  50. </if>
  51. <if test=" null != sharingStatus ">
  52. and `sharing_status` = #{sharingStatus}
  53. </if>
  54. <if test=" null != finishTime ">
  55. and `finish_time` like concat('%', #{finishTime},'%')
  56. </if>
  57. <if test=" null != failedReason ">
  58. and `failed_reason` like concat('%', #{failedReason},'%')
  59. </if>
  60. <if test=" null != ids ">
  61. and id in
  62. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  63. #{idItem}
  64. </foreach>
  65. </if>
  66. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  67. </sql>
  68. <select id="findList" parameterType="com.iformall.domain.po.WxProfitSharingResult" resultMap="BaseResultMap">
  69. select
  70. <include refid="allColumns"/>
  71. from wx_profit_sharing_result
  72. <include refid="dynamicWhereConditions" />
  73. </select>
  74. </mapper>