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.
 
 
 
 
 

106 lines
3.1 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.WxProfitSharingReceiverMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxProfitSharingReceiver">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
  7. <result column="receiver_type" jdbcType="INTEGER" property="receiverType" />
  8. <result column="receiver_account" jdbcType="VARCHAR" property="receiverAccount" />
  9. <result column="receiver_comments" jdbcType="VARCHAR" property="receiverComments" />
  10. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  11. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  12. <result column="sharing_type" jdbcType="INTEGER" property="sharingType" />
  13. <result column="bank_no" jdbcType="VARCHAR" property="bankNo" />
  14. <result column="true_name" jdbcType="VARCHAR" property="trueName" />
  15. <result column="bank_code" jdbcType="VARCHAR" property="bankCode" />
  16. <result column="status" jdbcType="INTEGER" property="status" />
  17. </resultMap>
  18. <sql id="allColumns">
  19. `id`,`merchant_id`,`receiver_type`,`receiver_account`,`receiver_comments`,`create_time`,`update_time`,`sharing_type`,`bank_no`,`true_name`,`bank_code`,`status`
  20. </sql>
  21. <sql id="dynamicWhereConditions">
  22. where 1 = 1
  23. <if test=" null != id ">
  24. and `id` = #{id}
  25. </if>
  26. <if test=" null != merchantId ">
  27. and `merchant_id` = #{merchantId}
  28. </if>
  29. <if test=" null != receiverType ">
  30. and `receiver_type` = #{receiverType}
  31. </if>
  32. <if test=" null != receiverAccount ">
  33. and `receiver_account` like concat('%', #{receiverAccount},'%')
  34. </if>
  35. <if test=" null != receiverComments ">
  36. and `receiver_comments` like concat('%', #{receiverComments},'%')
  37. </if>
  38. <if test=" null != createTime ">
  39. and `create_time` = #{createTime}
  40. </if>
  41. <if test=" null != updateTime ">
  42. and `update_time` = #{updateTime}
  43. </if>
  44. <if test=" null != sharingType ">
  45. and `sharing_type` = #{sharingType}
  46. </if>
  47. <if test=" null != bankNo ">
  48. and `bank_no` like concat('%', #{bankNo},'%')
  49. </if>
  50. <if test=" null != trueName ">
  51. and `true_name` like concat('%', #{trueName},'%')
  52. </if>
  53. <if test=" null != bankCode ">
  54. and `bank_code` like concat('%', #{bankCode},'%')
  55. </if>
  56. <if test=" null != status ">
  57. and `status` = #{status}
  58. </if>
  59. <if test=" null != ids ">
  60. and id in
  61. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  62. #{idItem}
  63. </foreach>
  64. </if>
  65. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  66. </sql>
  67. <select id="findList" parameterType="com.iformall.domain.po.WxProfitSharingReceiver" resultMap="BaseResultMap">
  68. select <include refid="allColumns" /> from wx_profit_sharing_receiver
  69. <include refid="dynamicWhereConditions" />
  70. </select>
  71. </mapper>