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.
 
 
 
 
 

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