Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 

139 rader
5.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.WxAuthorizerInfoMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxAuthorizerInfo">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="authorizer_appid" jdbcType="VARCHAR" property="authorizerAppid" />
  7. <result column="head_img" jdbcType="VARCHAR" property="headImg" />
  8. <result column="alias" jdbcType="VARCHAR" property="alias" />
  9. <result column="qrcode_url" jdbcType="VARCHAR" property="qrcodeUrl" />
  10. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  11. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  12. <result column="authorization_status" jdbcType="INTEGER" property="authorizationStatus" />
  13. <result column="auth_time" jdbcType="TIMESTAMP" property="authTime" />
  14. <result column="current_version" jdbcType="VARCHAR" property="currentVersion" />
  15. <result column="current_desc" jdbcType="VARCHAR" property="currentDesc" />
  16. <result column="release_time" jdbcType="TIMESTAMP" property="releaseTime" />
  17. </resultMap>
  18. <sql id="allColumns">
  19. `id`,`authorizer_appid`,`head_img`,`alias`,`qrcode_url`,`create_time`,`authorization_status`,`auth_time`,`current_version`,`current_desc`,`release_time`
  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 != authorizerAppid ">
  27. and `authorizer_appid` = #{authorizerAppid}
  28. </if>
  29. <if test=" null != headImg ">
  30. and `head_img` like concat('%', #{headImg},'%')
  31. </if>
  32. <if test=" null != alias ">
  33. and `alias` like concat('%', #{alias},'%')
  34. </if>
  35. <if test=" null != qrcodeUrl ">
  36. and `qrcode_url` like concat('%', #{qrcodeUrl},'%')
  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 != authorizationStatus ">
  45. and `authorization_status` = #{authorizationStatus}
  46. </if>
  47. <if test=" null != authTime ">
  48. and `auth_time` = #{authTime}
  49. </if>
  50. <if test=" null != currentVersion ">
  51. and `current_version` = #{currentVersion}
  52. </if>
  53. <if test=" null != currentDesc ">
  54. and `current_desc` like concat('%', #{currentDesc},'%')
  55. </if>
  56. <if test=" null != releaseTime ">
  57. and `release_time` = #{releaseTime}
  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.WxAuthorizerInfo" resultMap="BaseResultMap">
  68. select <include refid="allColumns" /> from wx_authorizer_info
  69. <include refid="dynamicWhereConditions" />
  70. </select>
  71. <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappInfo">
  72. <id column="id" jdbcType="BIGINT" property="id" />
  73. <result column="authorizer_appid" jdbcType="VARCHAR" property="authorizerAppid" />
  74. <result column="head_img" jdbcType="VARCHAR" property="headImg" />
  75. <result column="alias" jdbcType="VARCHAR" property="alias" />
  76. <result column="qrcode_url" jdbcType="VARCHAR" property="qrcodeUrl" />
  77. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  78. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  79. <result column="authorization_status" jdbcType="INTEGER" property="authorizationStatus" />
  80. <result column="auth_time" jdbcType="TIMESTAMP" property="authTime" />
  81. <result column="current_version" jdbcType="VARCHAR" property="currentVersion" />
  82. <result column="current_desc" jdbcType="VARCHAR" property="currentDesc" />
  83. <result column="release_time" jdbcType="TIMESTAMP" property="releaseTime" />
  84. <result column="type" jdbcType="INTEGER" property="type" />
  85. <result column="name" jdbcType="TIMESTAMP" property="name" />
  86. </resultMap>
  87. <sql id="allVColumns">
  88. ai.`id`,ai.`authorizer_appid`,ai.`head_img`,ai.`alias`,ai.`qrcode_url`,ai.`create_time`,ai.`update_time`,
  89. ai.`authorization_status`,ai.`auth_time`,
  90. ai.`current_version`,ai.`current_desc`,ai.`release_time`,
  91. a.`type`,a.`name`
  92. </sql>
  93. <sql id="dynamicVWhereConditions">
  94. where 1 = 1
  95. <if test=" null != id ">
  96. and ai.`id` = #{id}
  97. </if>
  98. <if test=" null != name ">
  99. and a.`name` like concat('%', #{name},'%')
  100. </if>
  101. <if test=" null != authorizerAppid ">
  102. and ai.`authorizer_appid` = #{authorizerAppid}
  103. </if>
  104. <if test=" null != type ">
  105. and a.`type` = #{type}
  106. </if>
  107. <if test=" null != currentVersion ">
  108. and ai.`current_version` = #{currentVersion}
  109. </if>
  110. <if test=" null != ids ">
  111. and ai.id in
  112. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  113. #{idItem}
  114. </foreach>
  115. </if>
  116. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  117. </sql>
  118. <select id="findVoList" parameterType="com.iformall.domain.vo.WxWeappInfo" resultMap="VBaseResultMap">
  119. select <include refid="allVColumns" />
  120. from wx_authorizer_info ai
  121. left join wx_appinfo a on ai.`authorizer_appid` = a.app_id
  122. <include refid="dynamicVWhereConditions" />
  123. </select>
  124. </mapper>