Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 

148 rindas
6.2 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. <update id="updateReleaseInfo" parameterType="com.iformall.domain.po.WxAuthorizerInfo" >
  72. update wx_authorizer_info
  73. set `current_version` = #{currentVersion}, `current_desc` = #{currentDesc}, `release_time` = #{releaseTime}, `update_time` = ${updateTime}
  74. where `authorizer_appid` = #{authorizerAppid}
  75. </update>
  76. <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappInfo">
  77. <id column="id" jdbcType="BIGINT" property="id" />
  78. <result column="authorizer_appid" jdbcType="VARCHAR" property="authorizerAppid" />
  79. <result column="head_img" jdbcType="VARCHAR" property="headImg" />
  80. <result column="alias" jdbcType="VARCHAR" property="alias" />
  81. <result column="qrcode_url" jdbcType="VARCHAR" property="qrcodeUrl" />
  82. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  83. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  84. <result column="authorization_status" jdbcType="INTEGER" property="authorizationStatus" />
  85. <result column="auth_time" jdbcType="TIMESTAMP" property="authTime" />
  86. <result column="current_version" jdbcType="VARCHAR" property="currentVersion" />
  87. <result column="current_desc" jdbcType="VARCHAR" property="currentDesc" />
  88. <result column="release_time" jdbcType="TIMESTAMP" property="releaseTime" />
  89. <result column="type" jdbcType="INTEGER" property="type" />
  90. <result column="name" jdbcType="TIMESTAMP" property="name" />
  91. </resultMap>
  92. <sql id="allVColumns">
  93. ai.`id`,ai.`authorizer_appid`,ai.`head_img`,ai.`alias`,ai.`qrcode_url`,ai.`create_time`,ai.`update_time`,
  94. ai.`authorization_status`,ai.`auth_time`,
  95. ai.`current_version`,ai.`current_desc`,ai.`release_time`,
  96. a.`type`,a.`name`
  97. </sql>
  98. <sql id="dynamicVWhereConditions">
  99. where 1 = 1
  100. <if test=" null != id ">
  101. and ai.`id` = #{id}
  102. </if>
  103. <if test=" null != name ">
  104. and a.`name` like concat('%', #{name},'%')
  105. </if>
  106. <if test=" null != type ">
  107. and a.`type` = #{type}
  108. </if>
  109. <if test=" null != authorizerAppid ">
  110. and ai.`authorizer_appid` = #{authorizerAppid}
  111. </if>
  112. <if test=" null != authorizationStatus ">
  113. and ai.`authorization_status` = #{authorizationStatus}
  114. </if>
  115. <if test=" null != currentVersion ">
  116. and ai.`current_version` = #{currentVersion}
  117. </if>
  118. <if test=" null != ids ">
  119. and ai.id in
  120. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  121. #{idItem}
  122. </foreach>
  123. </if>
  124. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  125. </sql>
  126. <select id="findVoList" parameterType="com.iformall.domain.vo.WxWeappInfo" resultMap="VBaseResultMap">
  127. select <include refid="allVColumns" />
  128. from wx_authorizer_info ai
  129. left join wx_appinfo a on ai.`authorizer_appid` = a.app_id
  130. <include refid="dynamicVWhereConditions" />
  131. </select>
  132. </mapper>