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

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