PlatformMapper.xml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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.book.dao.cps.mapper.PlatformMapper">
  4. <resultMap id="BaseResultMap" type="com.book.dao.cps.pojo.Platform">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="name" jdbcType="VARCHAR" property="name" />
  7. <result column="appid" jdbcType="VARCHAR" property="appid" />
  8. <result column="secret" jdbcType="VARCHAR" property="secret" />
  9. <result column="token" jdbcType="VARCHAR" property="token" />
  10. <result column="aes_key" jdbcType="VARCHAR" property="aesKey" />
  11. <result column="platfile" jdbcType="VARCHAR" property="platfile" />
  12. <result column="status" jdbcType="OTHER" property="status" />
  13. <result column="p_desc" jdbcType="VARCHAR" property="pDesc" />
  14. <result column="isdefault" jdbcType="OTHER" property="isdefault" />
  15. <result column="createtime" jdbcType="INTEGER" property="createtime" />
  16. <result column="updatetime" jdbcType="INTEGER" property="updatetime" />
  17. <result column="authhost" jdbcType="VARCHAR" property="authhost" />
  18. <result column="proxy_config" jdbcType="VARCHAR" property="proxyConfig" />
  19. <result column="job_proxy_config" jdbcType="VARCHAR" property="jobProxyConfig" />
  20. </resultMap>
  21. <sql id="Base_Column_List">
  22. id, `name`, appid, secret, token, aes_key, platfile, `status`, p_desc, isdefault,
  23. createtime, updatetime, authhost, proxy_config, job_proxy_config
  24. </sql>
  25. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  26. select
  27. <include refid="Base_Column_List" />
  28. from platform
  29. where id = #{id,jdbcType=INTEGER}
  30. </select>
  31. <select id="selectAll" resultType="com.book.dao.cps.pojo.Platform">
  32. SELECT * FROM platform;
  33. </select>
  34. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  35. delete from platform
  36. where id = #{id,jdbcType=INTEGER}
  37. </delete>
  38. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.book.dao.cps.pojo.Platform" useGeneratedKeys="true">
  39. insert into platform (`name`, appid, secret,
  40. token, aes_key, platfile,
  41. `status`, p_desc, isdefault,
  42. createtime, updatetime, authhost,
  43. proxy_config, job_proxy_config)
  44. values (#{name,jdbcType=VARCHAR}, #{appid,jdbcType=VARCHAR}, #{secret,jdbcType=VARCHAR},
  45. #{token,jdbcType=VARCHAR}, #{aesKey,jdbcType=VARCHAR}, #{platfile,jdbcType=VARCHAR},
  46. #{status,jdbcType=OTHER}, #{pDesc,jdbcType=VARCHAR}, #{isdefault,jdbcType=OTHER},
  47. #{createtime,jdbcType=INTEGER}, #{updatetime,jdbcType=INTEGER}, #{authhost,jdbcType=VARCHAR},
  48. #{proxyConfig,jdbcType=VARCHAR}, #{jobProxyConfig,jdbcType=VARCHAR})
  49. </insert>
  50. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.book.dao.cps.pojo.Platform" useGeneratedKeys="true">
  51. insert into platform
  52. <trim prefix="(" suffix=")" suffixOverrides=",">
  53. <if test="name != null">
  54. `name`,
  55. </if>
  56. <if test="appid != null">
  57. appid,
  58. </if>
  59. <if test="secret != null">
  60. secret,
  61. </if>
  62. <if test="token != null">
  63. token,
  64. </if>
  65. <if test="aesKey != null">
  66. aes_key,
  67. </if>
  68. <if test="platfile != null">
  69. platfile,
  70. </if>
  71. <if test="status != null">
  72. `status`,
  73. </if>
  74. <if test="pDesc != null">
  75. p_desc,
  76. </if>
  77. <if test="isdefault != null">
  78. isdefault,
  79. </if>
  80. <if test="createtime != null">
  81. createtime,
  82. </if>
  83. <if test="updatetime != null">
  84. updatetime,
  85. </if>
  86. <if test="authhost != null">
  87. authhost,
  88. </if>
  89. <if test="proxyConfig != null">
  90. proxy_config,
  91. </if>
  92. <if test="jobProxyConfig != null">
  93. job_proxy_config,
  94. </if>
  95. </trim>
  96. <trim prefix="values (" suffix=")" suffixOverrides=",">
  97. <if test="name != null">
  98. #{name,jdbcType=VARCHAR},
  99. </if>
  100. <if test="appid != null">
  101. #{appid,jdbcType=VARCHAR},
  102. </if>
  103. <if test="secret != null">
  104. #{secret,jdbcType=VARCHAR},
  105. </if>
  106. <if test="token != null">
  107. #{token,jdbcType=VARCHAR},
  108. </if>
  109. <if test="aesKey != null">
  110. #{aesKey,jdbcType=VARCHAR},
  111. </if>
  112. <if test="platfile != null">
  113. #{platfile,jdbcType=VARCHAR},
  114. </if>
  115. <if test="status != null">
  116. #{status,jdbcType=OTHER},
  117. </if>
  118. <if test="pDesc != null">
  119. #{pDesc,jdbcType=VARCHAR},
  120. </if>
  121. <if test="isdefault != null">
  122. #{isdefault,jdbcType=OTHER},
  123. </if>
  124. <if test="createtime != null">
  125. #{createtime,jdbcType=INTEGER},
  126. </if>
  127. <if test="updatetime != null">
  128. #{updatetime,jdbcType=INTEGER},
  129. </if>
  130. <if test="authhost != null">
  131. #{authhost,jdbcType=VARCHAR},
  132. </if>
  133. <if test="proxyConfig != null">
  134. #{proxyConfig,jdbcType=VARCHAR},
  135. </if>
  136. <if test="jobProxyConfig != null">
  137. #{jobProxyConfig,jdbcType=VARCHAR},
  138. </if>
  139. </trim>
  140. </insert>
  141. <update id="updateByPrimaryKeySelective" parameterType="com.book.dao.cps.pojo.Platform">
  142. update platform
  143. <set>
  144. <if test="name != null">
  145. `name` = #{name,jdbcType=VARCHAR},
  146. </if>
  147. <if test="appid != null">
  148. appid = #{appid,jdbcType=VARCHAR},
  149. </if>
  150. <if test="secret != null">
  151. secret = #{secret,jdbcType=VARCHAR},
  152. </if>
  153. <if test="token != null">
  154. token = #{token,jdbcType=VARCHAR},
  155. </if>
  156. <if test="aesKey != null">
  157. aes_key = #{aesKey,jdbcType=VARCHAR},
  158. </if>
  159. <if test="platfile != null">
  160. platfile = #{platfile,jdbcType=VARCHAR},
  161. </if>
  162. <if test="status != null">
  163. `status` = #{status,jdbcType=OTHER},
  164. </if>
  165. <if test="pDesc != null">
  166. p_desc = #{pDesc,jdbcType=VARCHAR},
  167. </if>
  168. <if test="isdefault != null">
  169. isdefault = #{isdefault,jdbcType=OTHER},
  170. </if>
  171. <if test="createtime != null">
  172. createtime = #{createtime,jdbcType=INTEGER},
  173. </if>
  174. <if test="updatetime != null">
  175. updatetime = #{updatetime,jdbcType=INTEGER},
  176. </if>
  177. <if test="authhost != null">
  178. authhost = #{authhost,jdbcType=VARCHAR},
  179. </if>
  180. <if test="proxyConfig != null">
  181. proxy_config = #{proxyConfig,jdbcType=VARCHAR},
  182. </if>
  183. <if test="jobProxyConfig != null">
  184. job_proxy_config = #{jobProxyConfig,jdbcType=VARCHAR},
  185. </if>
  186. </set>
  187. where id = #{id,jdbcType=INTEGER}
  188. </update>
  189. <update id="updateByPrimaryKey" parameterType="com.book.dao.cps.pojo.Platform">
  190. update platform
  191. set `name` = #{name,jdbcType=VARCHAR},
  192. appid = #{appid,jdbcType=VARCHAR},
  193. secret = #{secret,jdbcType=VARCHAR},
  194. token = #{token,jdbcType=VARCHAR},
  195. aes_key = #{aesKey,jdbcType=VARCHAR},
  196. platfile = #{platfile,jdbcType=VARCHAR},
  197. `status` = #{status,jdbcType=OTHER},
  198. p_desc = #{pDesc,jdbcType=VARCHAR},
  199. isdefault = #{isdefault,jdbcType=OTHER},
  200. createtime = #{createtime,jdbcType=INTEGER},
  201. updatetime = #{updatetime,jdbcType=INTEGER},
  202. authhost = #{authhost,jdbcType=VARCHAR},
  203. proxy_config = #{proxyConfig,jdbcType=VARCHAR},
  204. job_proxy_config = #{jobProxyConfig,jdbcType=VARCHAR}
  205. where id = #{id,jdbcType=INTEGER}
  206. </update>
  207. </mapper>