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

158 строки
6.5 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.WxWeappCodeStatusMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxWeappCodeStatus">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="app_id" jdbcType="VARCHAR" property="appId" />
  7. <result column="type" jdbcType="INTEGER" property="type" />
  8. <result column="user_version" jdbcType="VARCHAR" property="userVersion" />
  9. <result column="code_status" jdbcType="INTEGER" property="codeStatus" />
  10. <result column="code_err_code" jdbcType="INTEGER" property="codeErrCode" />
  11. <result column="code_time" jdbcType="TIMESTAMP" property="codeTime" />
  12. <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
  13. <result column="audit_err_code" jdbcType="INTEGER" property="auditErrCode" />
  14. <result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
  15. <result column="release_status" jdbcType="INTEGER" property="releaseStatus" />
  16. <result column="release_err_code" jdbcType="INTEGER" property="releaseErrCode" />
  17. <result column="release_time" jdbcType="TIMESTAMP" property="releaseTime" />
  18. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  19. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  20. </resultMap>
  21. <sql id="allColumns">
  22. `id`,`app_id`,`type`,`user_version`,
  23. `code_status`,`code_err_code`,`code_time`,
  24. `audit_status`,`audit_err_code`,`audit_time`,
  25. `release_status`,`release_err_code`,`release_time`,
  26. `create_time`,`update_time`
  27. </sql>
  28. <sql id="dynamicWhereConditions">
  29. where 1 = 1
  30. <if test=" null != id ">
  31. and `id` = #{id}
  32. </if>
  33. <if test=" null != appId ">
  34. and `app_id` = #{appId}
  35. </if>
  36. <if test=" null != type ">
  37. and `type` = #{type}
  38. </if>
  39. <if test=" null != userVersion ">
  40. and `user_version` = #{userVersion}
  41. </if>
  42. <if test=" null != codeStatus ">
  43. and `code_status` = #{codeStatus}
  44. </if>
  45. <if test=" null != auditStatus ">
  46. and `audit_status` = #{auditStatus}
  47. </if>
  48. <if test=" null != releaseStatus ">
  49. and `release_status` = #{releaseStatus}
  50. </if>
  51. <if test=" null != createTime ">
  52. and `create_time` = #{createTime}
  53. </if>
  54. <if test=" null != updateTime ">
  55. and `update_time` = #{updateTime}
  56. </if>
  57. <if test=" null != ids ">
  58. and id in
  59. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  60. #{idItem}
  61. </foreach>
  62. </if>
  63. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  64. </sql>
  65. <select id="findList" parameterType="com.iformall.domain.po.WxWeappCodeStatus" resultMap="BaseResultMap">
  66. select <include refid="allColumns" /> from wx_weapp_code_status
  67. <include refid="dynamicWhereConditions" />
  68. </select>
  69. <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappCodeStatusVo">
  70. <id column="id" jdbcType="BIGINT" property="id" />
  71. <result column="app_id" jdbcType="VARCHAR" property="appId" />
  72. <result column="type" jdbcType="INTEGER" property="type" />
  73. <result column="user_version" jdbcType="VARCHAR" property="userVersion" />
  74. <result column="code_status" jdbcType="INTEGER" property="codeStatus" />
  75. <result column="code_err_code" jdbcType="INTEGER" property="codeErrCode" />
  76. <result column="code_time" jdbcType="TIMESTAMP" property="codeTime" />
  77. <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
  78. <result column="audit_err_code" jdbcType="INTEGER" property="auditErrCode" />
  79. <result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
  80. <result column="release_status" jdbcType="INTEGER" property="releaseStatus" />
  81. <result column="release_err_code" jdbcType="INTEGER" property="releaseErrCode" />
  82. <result column="release_time" jdbcType="TIMESTAMP" property="releaseTime" />
  83. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  84. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  85. <result column="name" jdbcType="TIMESTAMP" property="name" />
  86. </resultMap>
  87. <sql id="allVoColumns">
  88. c.`id`,c.`app_id`,c.`type`,c.`user_version`,
  89. c.`code_status`,c.`code_err_code`,c.`code_time`,
  90. c.`audit_status`,c.`audit_err_code`,c.`audit_time`,
  91. c.`release_status`,c.`release_err_code`,c.`release_time`,
  92. c.`create_time`,c.`update_time`,
  93. a.`name`
  94. </sql>
  95. <sql id="dynamicVoWhereConditions">
  96. where 1 = 1
  97. <if test=" null != id ">
  98. and c.`id` = #{id}
  99. </if>
  100. <if test=" null != appId ">
  101. and c.`app_id` = #{appId}
  102. </if>
  103. <if test=" null != type ">
  104. and c.`type` = #{type}
  105. </if>
  106. <if test=" null != userVersion ">
  107. and c.`user_version` = #{userVersion}
  108. </if>
  109. <if test=" null != codeStatus ">
  110. and c.`code_status` = #{codeStatus}
  111. </if>
  112. <if test=" null != auditStatus ">
  113. and c.`audit_status` = #{auditStatus}
  114. </if>
  115. <if test=" null != releaseStatus ">
  116. and c.`release_status` = #{releaseStatus}
  117. </if>
  118. <if test=" null != createTime ">
  119. and c.`create_time` = #{createTime}
  120. </if>
  121. <if test=" null != updateTime ">
  122. and c.`update_time` = #{updateTime}
  123. </if>
  124. <if test=" null != name ">
  125. and a.`name` like concat('%', #{name},'%')
  126. </if>
  127. <if test=" null != ids ">
  128. and id in
  129. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  130. #{idItem}
  131. </foreach>
  132. </if>
  133. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  134. </sql>
  135. <select id="findVoList" parameterType="com.iformall.domain.vo.WxWeappCodeStatusVo" resultMap="VBaseResultMap">
  136. select <include refid="allVoColumns" />
  137. from wx_weapp_code_status c
  138. left join wx_appinfo a on c.`app_id` = a.`app_id`
  139. <include refid="dynamicVoWhereConditions" />
  140. </select>
  141. <select id="findUserVersions" parameterType="string" resultType="hashmap" >
  142. select user_version as version
  143. from wx_weapp_code_status
  144. group by user_version
  145. </select>
  146. </mapper>