PlatformMapper.xml 7.7 KB

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