Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

108 строки
3.9 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.WxAppinfoMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxAppinfo">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="app_id" jdbcType="VARCHAR" property="appId"/>
  8. <result column="parent_app_id" jdbcType="VARCHAR" property="parentAppId"/>
  9. <result column="name" jdbcType="VARCHAR" property="name"/>
  10. <result column="secret" jdbcType="VARCHAR" property="secret"/>
  11. <result column="token" jdbcType="VARCHAR" property="token"/>
  12. <result column="aes_key" jdbcType="VARCHAR" property="aesKey"/>
  13. <result column="msg_data_format" jdbcType="VARCHAR" property="msgDataFormat"/>
  14. <result column="access_token" jdbcType="VARCHAR" property="accessToken"/>
  15. <result column="last_token_time" jdbcType="TIMESTAMP" property="lastTokenTime"/>
  16. <result column="expires_in" jdbcType="INTEGER" property="expiresIn"/>
  17. <result column="pay_id" jdbcType="BIGINT" property="payId"/>
  18. <result column="type" jdbcType="INTEGER" property="type"/>
  19. <result column="pay_bill_id" jdbcType="BIGINT" property="payBillId"/>
  20. </resultMap>
  21. <sql id="allColumns">
  22. `id`,`tenant_id`,`app_id`,`parent_app_id`,`name`,`secret`,`token`,`aes_key`,`msg_data_format`,`access_token`,`last_token_time`,`expires_in`,`pay_id`,`type`,`pay_bill_id`
  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 ">
  30. and `tenant_id` = #{tenantId}
  31. </if>
  32. <if test=" null != appId ">
  33. and `app_id` like concat('%', #{appId},'%')
  34. </if>
  35. <if test=" null != parentAppId ">
  36. and `parent_app_id` like concat('%', #{parentAppId},'%')
  37. </if>
  38. <if test=" null != name ">
  39. and `name` like concat('%', #{name},'%')
  40. </if>
  41. <if test=" null != secret ">
  42. and `secret` like concat('%', #{secret},'%')
  43. </if>
  44. <if test=" null != token ">
  45. and `token` like concat('%', #{token},'%')
  46. </if>
  47. <if test=" null != aesKey ">
  48. and `aes_key` like concat('%', #{aesKey},'%')
  49. </if>
  50. <if test=" null != msgDataFormat ">
  51. and `msg_data_format` like concat('%', #{msgDataFormat},'%')
  52. </if>
  53. <if test=" null != accessToken ">
  54. and `access_token` like concat('%', #{accessToken},'%')
  55. </if>
  56. <if test=" null != lastTokenTime ">
  57. and `last_token_time` = #{lastTokenTime}
  58. </if>
  59. <if test=" null != expiresIn ">
  60. and `expires_in` = #{expiresIn}
  61. </if>
  62. <if test=" null != payId ">
  63. and `pay_id` = #{payId}
  64. </if>
  65. <if test=" null != type ">
  66. and `type` = #{type}
  67. </if>
  68. <if test=" null != payBillId ">
  69. and `pay_bill_id` = #{payBillId}
  70. </if>
  71. <if test=" null != ids ">
  72. and id in
  73. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  74. #{idItem}
  75. </foreach>
  76. </if>
  77. <if test=" null != sortColumns">order by ${sortColumns}</if>
  78. </sql>
  79. <select id="findList" parameterType="com.iformall.domain.po.WxAppinfo" resultMap="BaseResultMap">
  80. select
  81. <include refid="allColumns"/>
  82. from wx_appinfo
  83. <include refid="dynamicWhereConditions"/>
  84. </select>
  85. <select id="findByAppId" parameterType="java.lang.String" resultMap="BaseResultMap">
  86. SELECT *
  87. FROM wx_appinfo
  88. WHERE `app_id` = #{appId}
  89. </select>
  90. </mapper>