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

122 строки
4.8 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="version_desc" jdbcType="VARCHAR" property="versionDesc" />
  10. <result column="code_status" jdbcType="INTEGER" property="codeStatus" />
  11. <result column="code_err_code" jdbcType="VARCHAR" property="codeErrCode" />
  12. <result column="code_time" jdbcType="TIMESTAMP" property="codeTime" />
  13. </resultMap>
  14. <sql id="allColumns">
  15. `id`,`app_id`,`type`,`user_version`,`version_desc`,`code_status`,`code_err_code`,`code_time`
  16. </sql>
  17. <sql id="dynamicWhereConditions">
  18. where 1 = 1
  19. <if test=" null != id ">
  20. and `id` = #{id}
  21. </if>
  22. <if test=" null != appId ">
  23. and `app_id` = #{appId}
  24. </if>
  25. <if test=" null != type ">
  26. and `type` = #{type}
  27. </if>
  28. <if test=" null != userVersion ">
  29. and `user_version` = #{userVersion}
  30. </if>
  31. <if test=" null != codeStatus ">
  32. and `code_status` = #{codeStatus}
  33. </if>
  34. <if test=" null != codeTime ">
  35. and `code_time` = #{codeTime}
  36. </if>
  37. <if test=" null != ids ">
  38. and id in
  39. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  40. #{idItem}
  41. </foreach>
  42. </if>
  43. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  44. </sql>
  45. <select id="findList" parameterType="com.iformall.domain.po.WxWeappCodeStatus" resultMap="BaseResultMap">
  46. select <include refid="allColumns" /> from wx_weapp_code_status
  47. <include refid="dynamicWhereConditions" />
  48. </select>
  49. <update id="updateStatus" parameterType="com.iformall.domain.po.WxWeappCodeStatus" >
  50. update wx_weapp_code_status
  51. set `user_version` = #{userVersion}, `version_desc`= #{versionDesc},
  52. `code_status` = #{codeStatus}, `code_err_code` = #{codeErrCode}, `code_time` = #{codeTime}
  53. where `app_id` = #{appId} and `type` = #{type}
  54. </update>
  55. <select id="findUserVersions" resultType="hashmap" >
  56. select user_version as version
  57. from wx_weapp_code_status
  58. where 1=1
  59. <if test=" null != type ">
  60. and `type` = #{type}
  61. </if>
  62. group by user_version
  63. </select>
  64. <resultMap id="VBaseResultMap" type="com.iformall.domain.vo.WxWeappCodeStatusVo">
  65. <id column="id" jdbcType="BIGINT" property="id" />
  66. <result column="app_id" jdbcType="VARCHAR" property="appId" />
  67. <result column="type" jdbcType="INTEGER" property="type" />
  68. <result column="user_version" jdbcType="VARCHAR" property="userVersion" />
  69. <result column="version_desc" jdbcType="VARCHAR" property="versionDesc" />
  70. <result column="code_status" jdbcType="INTEGER" property="codeStatus" />
  71. <result column="code_err_code" jdbcType="VARCHAR" property="codeErrCode" />
  72. <result column="code_time" jdbcType="TIMESTAMP" property="codeTime" />
  73. <result column="name" jdbcType="VARCHAR" property="name" />
  74. </resultMap>
  75. <sql id="allVoColumns">
  76. c.`id`,c.`app_id`,c.`type`,c.`user_version`,c.`version_desc`,c.`code_status`,c.`code_err_code`,c.`code_time`, a.`name`
  77. </sql>
  78. <sql id="dynamicVoWhereConditions">
  79. where 1 = 1
  80. <if test=" null != id ">
  81. and c.`id` = #{id}
  82. </if>
  83. <if test=" null != appId ">
  84. and c.`app_id` = #{appId}
  85. </if>
  86. <if test=" null != type ">
  87. and c.`type` = #{type}
  88. </if>
  89. <if test=" null != userVersion ">
  90. and c.`user_version` = #{userVersion}
  91. </if>
  92. <if test=" null != codeStatus ">
  93. and c.`code_status` = #{codeStatus}
  94. </if>
  95. <if test=" null != name ">
  96. and a.`name` like concat('%', #{name},'%')
  97. </if>
  98. <if test=" null != ids ">
  99. and id in
  100. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  101. #{idItem}
  102. </foreach>
  103. </if>
  104. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  105. </sql>
  106. <select id="findVoList" parameterType="com.iformall.domain.vo.WxWeappCodeStatusVo" resultMap="VBaseResultMap">
  107. select <include refid="allVoColumns" />
  108. from wx_weapp_code_status c
  109. left join wx_appinfo a on c.`app_id` = a.`app_id`
  110. <include refid="dynamicVoWhereConditions" />
  111. </select>
  112. </mapper>