Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 

75 linhas
2.7 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.WxPayAccountBillMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxPayAccountBill">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="mch_id" jdbcType="VARCHAR" property="mchId"/>
  7. <result column="sub_mch_id" jdbcType="VARCHAR" property="subMchId"/>
  8. <result column="api_key" jdbcType="VARCHAR" property="apiKey"/>
  9. <result column="notify_url" jdbcType="VARCHAR" property="notifyUrl"/>
  10. <result column="cert_path" jdbcType="VARCHAR" property="certPath"/>
  11. <result column="type" jdbcType="INTEGER" property="type"/>
  12. <result column="share" jdbcType="INTEGER" property="share"/>
  13. <result column="rate" jdbcType="INTEGER" property="rate"/>
  14. <result column="bank_account_name" jdbcType="VARCHAR" property="bankAccountName"/>
  15. <result column="bank_card_id" jdbcType="VARCHAR" property="bankCardId"/>
  16. </resultMap>
  17. <sql id="allColumns">
  18. `id`,`mch_id`,`sub_mch_id`,`api_key`,`notify_url`,`cert_path`,`type`,`share`,`rate`
  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 != mchId ">
  26. and `mch_id` = #{mchId}
  27. </if>
  28. <if test=" null != subMchId ">
  29. and `sub_mch_id` = #{subMchId}
  30. </if>
  31. <if test=" null != apiKey ">
  32. and `api_key` like concat('%', #{apiKey},'%')
  33. </if>
  34. <if test=" null != notifyUrl ">
  35. and `notify_url` like concat('%', #{notifyUrl},'%')
  36. </if>
  37. <if test=" null != certPath ">
  38. and `cert_path` like concat('%', #{certPath},'%')
  39. </if>
  40. <if test=" null != type ">
  41. and `type` = #{type}
  42. </if>
  43. <if test=" null != share ">
  44. and `share` = #{share}
  45. </if>
  46. <if test=" null != rate ">
  47. and `rate` = #{rate}
  48. </if>
  49. <if test=" null != ids ">
  50. and id in
  51. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  52. #{idItem}
  53. </foreach>
  54. </if>
  55. <if test=" null != sortColumns">order by ${sortColumns}</if>
  56. </sql>
  57. <select id="findList" parameterType="com.iformall.domain.po.WxPayAccount" resultMap="BaseResultMap">
  58. select
  59. <include refid="allColumns"/>
  60. from wx_pay_account
  61. <include refid="dynamicWhereConditions"/>
  62. </select>
  63. </mapper>