后台服务
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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