ConfigMapper.xml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863
  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.server.dao.mapper.ConfigMapper">
  4. <resultMap id="BaseResultMap" type="com.book.server.dao.entity.Config">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="name" jdbcType="VARCHAR" property="name" />
  12. <result column="group" jdbcType="VARCHAR" property="group" />
  13. <result column="title" jdbcType="VARCHAR" property="title" />
  14. <result column="tip" jdbcType="VARCHAR" property="tip" />
  15. <result column="type" jdbcType="VARCHAR" property="type" />
  16. <result column="rule" jdbcType="VARCHAR" property="rule" />
  17. <result column="extend" jdbcType="VARCHAR" property="extend" />
  18. </resultMap>
  19. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.book.server.dao.entity.Config">
  20. <!--
  21. WARNING - @mbg.generated
  22. This element is automatically generated by MyBatis Generator, do not modify.
  23. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  24. -->
  25. <result column="value" jdbcType="LONGVARCHAR" property="value" />
  26. <result column="content" jdbcType="LONGVARCHAR" property="content" />
  27. </resultMap>
  28. <sql id="Example_Where_Clause">
  29. <!--
  30. WARNING - @mbg.generated
  31. This element is automatically generated by MyBatis Generator, do not modify.
  32. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  33. -->
  34. <where>
  35. <foreach collection="oredCriteria" item="criteria" separator="or">
  36. <if test="criteria.valid">
  37. <trim prefix="(" prefixOverrides="and" suffix=")">
  38. <foreach collection="criteria.criteria" item="criterion">
  39. <choose>
  40. <when test="criterion.noValue">
  41. and ${criterion.condition}
  42. </when>
  43. <when test="criterion.singleValue">
  44. and ${criterion.condition} #{criterion.value}
  45. </when>
  46. <when test="criterion.betweenValue">
  47. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  48. </when>
  49. <when test="criterion.listValue">
  50. and ${criterion.condition}
  51. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  52. #{listItem}
  53. </foreach>
  54. </when>
  55. </choose>
  56. </foreach>
  57. </trim>
  58. </if>
  59. </foreach>
  60. </where>
  61. </sql>
  62. <sql id="Update_By_Example_Where_Clause">
  63. <!--
  64. WARNING - @mbg.generated
  65. This element is automatically generated by MyBatis Generator, do not modify.
  66. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  67. -->
  68. <where>
  69. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  70. <if test="criteria.valid">
  71. <trim prefix="(" prefixOverrides="and" suffix=")">
  72. <foreach collection="criteria.criteria" item="criterion">
  73. <choose>
  74. <when test="criterion.noValue">
  75. and ${criterion.condition}
  76. </when>
  77. <when test="criterion.singleValue">
  78. and ${criterion.condition} #{criterion.value}
  79. </when>
  80. <when test="criterion.betweenValue">
  81. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  82. </when>
  83. <when test="criterion.listValue">
  84. and ${criterion.condition}
  85. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  86. #{listItem}
  87. </foreach>
  88. </when>
  89. </choose>
  90. </foreach>
  91. </trim>
  92. </if>
  93. </foreach>
  94. </where>
  95. </sql>
  96. <sql id="Base_Column_List">
  97. <!--
  98. WARNING - @mbg.generated
  99. This element is automatically generated by MyBatis Generator, do not modify.
  100. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  101. -->
  102. id, name, group, title, tip, type, rule, extend
  103. </sql>
  104. <sql id="Blob_Column_List">
  105. <!--
  106. WARNING - @mbg.generated
  107. This element is automatically generated by MyBatis Generator, do not modify.
  108. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  109. -->
  110. value, content
  111. </sql>
  112. <select id="selectByExampleWithBLOBs" parameterType="com.book.server.dao.entity.example.ConfigExample" resultMap="ResultMapWithBLOBs">
  113. <!--
  114. WARNING - @mbg.generated
  115. This element is automatically generated by MyBatis Generator, do not modify.
  116. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  117. -->
  118. select
  119. <if test="distinct">
  120. distinct
  121. </if>
  122. <include refid="Base_Column_List" />
  123. ,
  124. <include refid="Blob_Column_List" />
  125. from config
  126. <if test="_parameter != null">
  127. <include refid="Example_Where_Clause" />
  128. </if>
  129. <if test="orderByClause != null">
  130. order by ${orderByClause}
  131. </if>
  132. <if test="rows != null">
  133. <if test="offset != null">
  134. limit ${offset}, ${rows}
  135. </if>
  136. <if test="offset == null">
  137. limit ${rows}
  138. </if>
  139. </if>
  140. </select>
  141. <select id="selectByExample" parameterType="com.book.server.dao.entity.example.ConfigExample" resultMap="BaseResultMap">
  142. <!--
  143. WARNING - @mbg.generated
  144. This element is automatically generated by MyBatis Generator, do not modify.
  145. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  146. -->
  147. select
  148. <if test="distinct">
  149. distinct
  150. </if>
  151. <include refid="Base_Column_List" />
  152. from config
  153. <if test="_parameter != null">
  154. <include refid="Example_Where_Clause" />
  155. </if>
  156. <if test="orderByClause != null">
  157. order by ${orderByClause}
  158. </if>
  159. <if test="rows != null">
  160. <if test="offset != null">
  161. limit ${offset}, ${rows}
  162. </if>
  163. <if test="offset == null">
  164. limit ${rows}
  165. </if>
  166. </if>
  167. </select>
  168. <select id="selectByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
  169. <!--
  170. WARNING - @mbg.generated
  171. This element is automatically generated by MyBatis Generator, do not modify.
  172. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  173. -->
  174. select
  175. <if test="example != null and example.distinct">
  176. distinct
  177. </if>
  178. <choose>
  179. <when test="selective != null and selective.length > 0">
  180. <foreach collection="selective" item="column" separator=",">
  181. ${column.aliasedEscapedColumnName}
  182. </foreach>
  183. </when>
  184. <otherwise>
  185. <include refid="Base_Column_List" />
  186. ,
  187. <include refid="Blob_Column_List" />
  188. </otherwise>
  189. </choose>
  190. from config
  191. <if test="example != null">
  192. <include refid="Update_By_Example_Where_Clause" />
  193. </if>
  194. <if test="example != null and example.orderByClause != null">
  195. order by ${example.orderByClause}
  196. </if>
  197. <if test="example != null and example.rows != null">
  198. <if test="example.offset != null">
  199. limit ${example.offset}, ${example.rows}
  200. </if>
  201. <if test="example.offset == null">
  202. limit ${example.rows}
  203. </if>
  204. </if>
  205. </select>
  206. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
  207. <!--
  208. WARNING - @mbg.generated
  209. This element is automatically generated by MyBatis Generator, do not modify.
  210. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  211. -->
  212. select
  213. <include refid="Base_Column_List" />
  214. ,
  215. <include refid="Blob_Column_List" />
  216. from config
  217. where id = #{id,jdbcType=INTEGER}
  218. </select>
  219. <select id="selectByPrimaryKeySelective" parameterType="map" resultMap="ResultMapWithBLOBs">
  220. <!--
  221. WARNING - @mbg.generated
  222. This element is automatically generated by MyBatis Generator, do not modify.
  223. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  224. -->
  225. select
  226. <choose>
  227. <when test="selective != null and selective.length > 0">
  228. <foreach collection="selective" item="column" separator=",">
  229. ${column.aliasedEscapedColumnName}
  230. </foreach>
  231. </when>
  232. <otherwise>
  233. <include refid="Base_Column_List" />
  234. ,
  235. <include refid="Blob_Column_List" />
  236. </otherwise>
  237. </choose>
  238. from config
  239. where id = #{id,jdbcType=INTEGER}
  240. </select>
  241. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  242. <!--
  243. WARNING - @mbg.generated
  244. This element is automatically generated by MyBatis Generator, do not modify.
  245. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  246. -->
  247. delete from config
  248. where id = #{id,jdbcType=INTEGER}
  249. </delete>
  250. <delete id="deleteByExample" parameterType="com.book.server.dao.entity.example.ConfigExample">
  251. <!--
  252. WARNING - @mbg.generated
  253. This element is automatically generated by MyBatis Generator, do not modify.
  254. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  255. -->
  256. delete from config
  257. <if test="_parameter != null">
  258. <include refid="Example_Where_Clause" />
  259. </if>
  260. </delete>
  261. <insert id="insert" parameterType="com.book.server.dao.entity.Config">
  262. <!--
  263. WARNING - @mbg.generated
  264. This element is automatically generated by MyBatis Generator, do not modify.
  265. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  266. -->
  267. insert into config (id, name, group,
  268. title, tip, type, rule,
  269. extend, value, content
  270. )
  271. values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{group,jdbcType=VARCHAR},
  272. #{title,jdbcType=VARCHAR}, #{tip,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{rule,jdbcType=VARCHAR},
  273. #{extend,jdbcType=VARCHAR}, #{value,jdbcType=LONGVARCHAR}, #{content,jdbcType=LONGVARCHAR}
  274. )
  275. </insert>
  276. <insert id="insertSelective" parameterType="map">
  277. <!--
  278. WARNING - @mbg.generated
  279. This element is automatically generated by MyBatis Generator, do not modify.
  280. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  281. -->
  282. insert into config
  283. <choose>
  284. <when test="selective != null and selective.length > 0">
  285. <foreach close=")" collection="selective" item="column" open="(" separator=",">
  286. ${column.escapedColumnName}
  287. </foreach>
  288. </when>
  289. <otherwise>
  290. <trim prefix="(" suffix=")" suffixOverrides=",">
  291. <if test="record.id != null">
  292. id,
  293. </if>
  294. <if test="record.name != null">
  295. name,
  296. </if>
  297. <if test="record.group != null">
  298. group,
  299. </if>
  300. <if test="record.title != null">
  301. title,
  302. </if>
  303. <if test="record.tip != null">
  304. tip,
  305. </if>
  306. <if test="record.type != null">
  307. type,
  308. </if>
  309. <if test="record.rule != null">
  310. rule,
  311. </if>
  312. <if test="record.extend != null">
  313. extend,
  314. </if>
  315. <if test="record.value != null">
  316. value,
  317. </if>
  318. <if test="record.content != null">
  319. content,
  320. </if>
  321. </trim>
  322. <trim prefix="(" suffix=")" suffixOverrides="," />
  323. </otherwise>
  324. </choose>
  325. values
  326. <choose>
  327. <when test="selective != null and selective.length > 0">
  328. <foreach close=")" collection="selective" item="column" open="(" separator=",">
  329. #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  330. </foreach>
  331. </when>
  332. <otherwise>
  333. <trim prefix="(" suffix=")" suffixOverrides=",">
  334. <if test="record.id != null">
  335. #{record.id,jdbcType=INTEGER},
  336. </if>
  337. <if test="record.name != null">
  338. #{record.name,jdbcType=VARCHAR},
  339. </if>
  340. <if test="record.group != null">
  341. #{record.group,jdbcType=VARCHAR},
  342. </if>
  343. <if test="record.title != null">
  344. #{record.title,jdbcType=VARCHAR},
  345. </if>
  346. <if test="record.tip != null">
  347. #{record.tip,jdbcType=VARCHAR},
  348. </if>
  349. <if test="record.type != null">
  350. #{record.type,jdbcType=VARCHAR},
  351. </if>
  352. <if test="record.rule != null">
  353. #{record.rule,jdbcType=VARCHAR},
  354. </if>
  355. <if test="record.extend != null">
  356. #{record.extend,jdbcType=VARCHAR},
  357. </if>
  358. <if test="record.value != null">
  359. #{record.value,jdbcType=LONGVARCHAR},
  360. </if>
  361. <if test="record.content != null">
  362. #{record.content,jdbcType=LONGVARCHAR},
  363. </if>
  364. </trim>
  365. </otherwise>
  366. </choose>
  367. </insert>
  368. <select id="countByExample" parameterType="com.book.server.dao.entity.example.ConfigExample" resultType="java.lang.Long">
  369. <!--
  370. WARNING - @mbg.generated
  371. This element is automatically generated by MyBatis Generator, do not modify.
  372. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  373. -->
  374. select count(*) from config
  375. <if test="_parameter != null">
  376. <include refid="Example_Where_Clause" />
  377. </if>
  378. </select>
  379. <update id="updateByExampleSelective" parameterType="map">
  380. <!--
  381. WARNING - @mbg.generated
  382. This element is automatically generated by MyBatis Generator, do not modify.
  383. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  384. -->
  385. update config
  386. SET
  387. <choose>
  388. <when test="selective != null and selective.length > 0">
  389. <foreach collection="selective" item="column" separator=",">
  390. ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  391. </foreach>
  392. </when>
  393. <otherwise>
  394. <trim suffixOverrides=",">
  395. <if test="record.id != null">
  396. id = #{record.id,jdbcType=INTEGER},
  397. </if>
  398. <if test="record.name != null">
  399. name = #{record.name,jdbcType=VARCHAR},
  400. </if>
  401. <if test="record.group != null">
  402. group = #{record.group,jdbcType=VARCHAR},
  403. </if>
  404. <if test="record.title != null">
  405. title = #{record.title,jdbcType=VARCHAR},
  406. </if>
  407. <if test="record.tip != null">
  408. tip = #{record.tip,jdbcType=VARCHAR},
  409. </if>
  410. <if test="record.type != null">
  411. type = #{record.type,jdbcType=VARCHAR},
  412. </if>
  413. <if test="record.rule != null">
  414. rule = #{record.rule,jdbcType=VARCHAR},
  415. </if>
  416. <if test="record.extend != null">
  417. extend = #{record.extend,jdbcType=VARCHAR},
  418. </if>
  419. <if test="record.value != null">
  420. value = #{record.value,jdbcType=LONGVARCHAR},
  421. </if>
  422. <if test="record.content != null">
  423. content = #{record.content,jdbcType=LONGVARCHAR},
  424. </if>
  425. </trim>
  426. </otherwise>
  427. </choose>
  428. <if test="_parameter != null">
  429. <include refid="Update_By_Example_Where_Clause" />
  430. </if>
  431. </update>
  432. <update id="updateByExampleWithBLOBs" parameterType="map">
  433. <!--
  434. WARNING - @mbg.generated
  435. This element is automatically generated by MyBatis Generator, do not modify.
  436. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  437. -->
  438. update config
  439. set id = #{record.id,jdbcType=INTEGER},
  440. name = #{record.name,jdbcType=VARCHAR},
  441. group = #{record.group,jdbcType=VARCHAR},
  442. title = #{record.title,jdbcType=VARCHAR},
  443. tip = #{record.tip,jdbcType=VARCHAR},
  444. type = #{record.type,jdbcType=VARCHAR},
  445. rule = #{record.rule,jdbcType=VARCHAR},
  446. extend = #{record.extend,jdbcType=VARCHAR},
  447. value = #{record.value,jdbcType=LONGVARCHAR},
  448. content = #{record.content,jdbcType=LONGVARCHAR}
  449. <if test="_parameter != null">
  450. <include refid="Update_By_Example_Where_Clause" />
  451. </if>
  452. </update>
  453. <update id="updateByExample" parameterType="map">
  454. <!--
  455. WARNING - @mbg.generated
  456. This element is automatically generated by MyBatis Generator, do not modify.
  457. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  458. -->
  459. update config
  460. set id = #{record.id,jdbcType=INTEGER},
  461. name = #{record.name,jdbcType=VARCHAR},
  462. group = #{record.group,jdbcType=VARCHAR},
  463. title = #{record.title,jdbcType=VARCHAR},
  464. tip = #{record.tip,jdbcType=VARCHAR},
  465. type = #{record.type,jdbcType=VARCHAR},
  466. rule = #{record.rule,jdbcType=VARCHAR},
  467. extend = #{record.extend,jdbcType=VARCHAR}
  468. <if test="_parameter != null">
  469. <include refid="Update_By_Example_Where_Clause" />
  470. </if>
  471. </update>
  472. <update id="updateByPrimaryKeySelective" parameterType="map">
  473. <!--
  474. WARNING - @mbg.generated
  475. This element is automatically generated by MyBatis Generator, do not modify.
  476. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  477. -->
  478. update config
  479. SET
  480. <choose>
  481. <when test="selective != null and selective.length > 0">
  482. <foreach collection="selective" item="column" separator=",">
  483. ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  484. </foreach>
  485. </when>
  486. <otherwise>
  487. <trim suffixOverrides=",">
  488. <if test="record.name != null">
  489. name = #{record.name,jdbcType=VARCHAR},
  490. </if>
  491. <if test="record.group != null">
  492. group = #{record.group,jdbcType=VARCHAR},
  493. </if>
  494. <if test="record.title != null">
  495. title = #{record.title,jdbcType=VARCHAR},
  496. </if>
  497. <if test="record.tip != null">
  498. tip = #{record.tip,jdbcType=VARCHAR},
  499. </if>
  500. <if test="record.type != null">
  501. type = #{record.type,jdbcType=VARCHAR},
  502. </if>
  503. <if test="record.rule != null">
  504. rule = #{record.rule,jdbcType=VARCHAR},
  505. </if>
  506. <if test="record.extend != null">
  507. extend = #{record.extend,jdbcType=VARCHAR},
  508. </if>
  509. <if test="record.value != null">
  510. value = #{record.value,jdbcType=LONGVARCHAR},
  511. </if>
  512. <if test="record.content != null">
  513. content = #{record.content,jdbcType=LONGVARCHAR},
  514. </if>
  515. </trim>
  516. </otherwise>
  517. </choose>
  518. where id = #{record.id,jdbcType=INTEGER}
  519. </update>
  520. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.book.server.dao.entity.Config">
  521. <!--
  522. WARNING - @mbg.generated
  523. This element is automatically generated by MyBatis Generator, do not modify.
  524. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  525. -->
  526. update config
  527. set name = #{name,jdbcType=VARCHAR},
  528. group = #{group,jdbcType=VARCHAR},
  529. title = #{title,jdbcType=VARCHAR},
  530. tip = #{tip,jdbcType=VARCHAR},
  531. type = #{type,jdbcType=VARCHAR},
  532. rule = #{rule,jdbcType=VARCHAR},
  533. extend = #{extend,jdbcType=VARCHAR},
  534. value = #{value,jdbcType=LONGVARCHAR},
  535. content = #{content,jdbcType=LONGVARCHAR}
  536. where id = #{id,jdbcType=INTEGER}
  537. </update>
  538. <update id="updateByPrimaryKey" parameterType="com.book.server.dao.entity.Config">
  539. <!--
  540. WARNING - @mbg.generated
  541. This element is automatically generated by MyBatis Generator, do not modify.
  542. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  543. -->
  544. update config
  545. set name = #{name,jdbcType=VARCHAR},
  546. group = #{group,jdbcType=VARCHAR},
  547. title = #{title,jdbcType=VARCHAR},
  548. tip = #{tip,jdbcType=VARCHAR},
  549. type = #{type,jdbcType=VARCHAR},
  550. rule = #{rule,jdbcType=VARCHAR},
  551. extend = #{extend,jdbcType=VARCHAR}
  552. where id = #{id,jdbcType=INTEGER}
  553. </update>
  554. <select id="selectOneByExample" parameterType="com.book.server.dao.entity.example.ConfigExample" resultMap="BaseResultMap">
  555. <!--
  556. WARNING - @mbg.generated
  557. This element is automatically generated by MyBatis Generator, do not modify.
  558. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  559. -->
  560. select
  561. <include refid="Base_Column_List" />
  562. from config
  563. <if test="_parameter != null">
  564. <include refid="Example_Where_Clause" />
  565. </if>
  566. <if test="orderByClause != null">
  567. order by ${orderByClause}
  568. </if>
  569. limit 1
  570. </select>
  571. <select id="selectOneByExampleWithBLOBs" parameterType="com.book.server.dao.entity.example.ConfigExample" resultMap="ResultMapWithBLOBs">
  572. <!--
  573. WARNING - @mbg.generated
  574. This element is automatically generated by MyBatis Generator, do not modify.
  575. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  576. -->
  577. select
  578. <include refid="Base_Column_List" />
  579. ,
  580. <include refid="Blob_Column_List" />
  581. from config
  582. <if test="_parameter != null">
  583. <include refid="Example_Where_Clause" />
  584. </if>
  585. <if test="orderByClause != null">
  586. order by ${orderByClause}
  587. </if>
  588. limit 1
  589. </select>
  590. <select id="selectOneByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
  591. <!--
  592. WARNING - @mbg.generated
  593. This element is automatically generated by MyBatis Generator, do not modify.
  594. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  595. -->
  596. select
  597. <choose>
  598. <when test="selective != null and selective.length > 0">
  599. <foreach collection="selective" item="column" separator=",">
  600. ${column.aliasedEscapedColumnName}
  601. </foreach>
  602. </when>
  603. <otherwise>
  604. <include refid="Base_Column_List" />
  605. ,
  606. <include refid="Blob_Column_List" />
  607. </otherwise>
  608. </choose>
  609. from config
  610. <if test="example != null">
  611. <include refid="Update_By_Example_Where_Clause" />
  612. </if>
  613. <if test="example != null and example.orderByClause != null">
  614. order by ${example.orderByClause}
  615. </if>
  616. limit 1
  617. </select>
  618. <insert id="batchInsert" parameterType="map">
  619. <!--
  620. WARNING - @mbg.generated
  621. This element is automatically generated by MyBatis Generator, do not modify.
  622. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  623. -->
  624. insert into config
  625. (id, name, group, title, tip, type, rule, extend, value, content)
  626. values
  627. <foreach collection="list" item="item" separator=",">
  628. (#{item.id,jdbcType=INTEGER}, #{item.name,jdbcType=VARCHAR}, #{item.group,jdbcType=VARCHAR},
  629. #{item.title,jdbcType=VARCHAR}, #{item.tip,jdbcType=VARCHAR}, #{item.type,jdbcType=VARCHAR},
  630. #{item.rule,jdbcType=VARCHAR}, #{item.extend,jdbcType=VARCHAR}, #{item.value,jdbcType=LONGVARCHAR},
  631. #{item.content,jdbcType=LONGVARCHAR})
  632. </foreach>
  633. </insert>
  634. <insert id="batchInsertSelective" parameterType="map">
  635. <!--
  636. WARNING - @mbg.generated
  637. This element is automatically generated by MyBatis Generator, do not modify.
  638. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  639. -->
  640. insert into config (
  641. <foreach collection="selective" item="column" separator=",">
  642. ${column.escapedColumnName}
  643. </foreach>
  644. )
  645. values
  646. <foreach collection="list" item="item" separator=",">
  647. (
  648. <foreach collection="selective" item="column" separator=",">
  649. <if test="'id'.toString() == column.value">
  650. #{item.id,jdbcType=INTEGER}
  651. </if>
  652. <if test="'name'.toString() == column.value">
  653. #{item.name,jdbcType=VARCHAR}
  654. </if>
  655. <if test="'group'.toString() == column.value">
  656. #{item.group,jdbcType=VARCHAR}
  657. </if>
  658. <if test="'title'.toString() == column.value">
  659. #{item.title,jdbcType=VARCHAR}
  660. </if>
  661. <if test="'tip'.toString() == column.value">
  662. #{item.tip,jdbcType=VARCHAR}
  663. </if>
  664. <if test="'type'.toString() == column.value">
  665. #{item.type,jdbcType=VARCHAR}
  666. </if>
  667. <if test="'rule'.toString() == column.value">
  668. #{item.rule,jdbcType=VARCHAR}
  669. </if>
  670. <if test="'extend'.toString() == column.value">
  671. #{item.extend,jdbcType=VARCHAR}
  672. </if>
  673. <if test="'value'.toString() == column.value">
  674. #{item.value,jdbcType=LONGVARCHAR}
  675. </if>
  676. <if test="'content'.toString() == column.value">
  677. #{item.content,jdbcType=LONGVARCHAR}
  678. </if>
  679. </foreach>
  680. )
  681. </foreach>
  682. </insert>
  683. <insert id="upsertSelective" parameterType="map">
  684. <!--
  685. WARNING - @mbg.generated
  686. This element is automatically generated by MyBatis Generator, do not modify.
  687. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  688. -->
  689. insert into config
  690. <choose>
  691. <when test="selective != null and selective.length > 0">
  692. <foreach close=")" collection="selective" item="column" open="(" separator=",">
  693. ${column.escapedColumnName}
  694. </foreach>
  695. </when>
  696. <otherwise>
  697. <trim prefix="(" suffix=")" suffixOverrides=",">
  698. <if test="record.id != null">
  699. id,
  700. </if>
  701. <if test="record.name != null">
  702. name,
  703. </if>
  704. <if test="record.group != null">
  705. group,
  706. </if>
  707. <if test="record.title != null">
  708. title,
  709. </if>
  710. <if test="record.tip != null">
  711. tip,
  712. </if>
  713. <if test="record.type != null">
  714. type,
  715. </if>
  716. <if test="record.rule != null">
  717. rule,
  718. </if>
  719. <if test="record.extend != null">
  720. extend,
  721. </if>
  722. <if test="record.value != null">
  723. value,
  724. </if>
  725. <if test="record.content != null">
  726. content,
  727. </if>
  728. </trim>
  729. <trim prefix="(" suffix=")" suffixOverrides="," />
  730. </otherwise>
  731. </choose>
  732. values
  733. <choose>
  734. <when test="selective != null and selective.length > 0">
  735. <foreach close=")" collection="selective" item="column" open="(" separator=",">
  736. #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  737. </foreach>
  738. </when>
  739. <otherwise>
  740. <trim prefix="(" suffix=")" suffixOverrides=",">
  741. <if test="record.id != null">
  742. #{record.id,jdbcType=INTEGER},
  743. </if>
  744. <if test="record.name != null">
  745. #{record.name,jdbcType=VARCHAR},
  746. </if>
  747. <if test="record.group != null">
  748. #{record.group,jdbcType=VARCHAR},
  749. </if>
  750. <if test="record.title != null">
  751. #{record.title,jdbcType=VARCHAR},
  752. </if>
  753. <if test="record.tip != null">
  754. #{record.tip,jdbcType=VARCHAR},
  755. </if>
  756. <if test="record.type != null">
  757. #{record.type,jdbcType=VARCHAR},
  758. </if>
  759. <if test="record.rule != null">
  760. #{record.rule,jdbcType=VARCHAR},
  761. </if>
  762. <if test="record.extend != null">
  763. #{record.extend,jdbcType=VARCHAR},
  764. </if>
  765. <if test="record.value != null">
  766. #{record.value,jdbcType=LONGVARCHAR},
  767. </if>
  768. <if test="record.content != null">
  769. #{record.content,jdbcType=LONGVARCHAR},
  770. </if>
  771. </trim>
  772. </otherwise>
  773. </choose>
  774. on duplicate key update
  775. <choose>
  776. <when test="selective != null and selective.length > 0">
  777. <foreach collection="selective" item="column" separator=",">
  778. ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
  779. </foreach>
  780. </when>
  781. <otherwise>
  782. <trim suffixOverrides=",">
  783. <if test="record.id != null">
  784. id = #{record.id,jdbcType=INTEGER},
  785. </if>
  786. <if test="record.name != null">
  787. name = #{record.name,jdbcType=VARCHAR},
  788. </if>
  789. <if test="record.group != null">
  790. group = #{record.group,jdbcType=VARCHAR},
  791. </if>
  792. <if test="record.title != null">
  793. title = #{record.title,jdbcType=VARCHAR},
  794. </if>
  795. <if test="record.tip != null">
  796. tip = #{record.tip,jdbcType=VARCHAR},
  797. </if>
  798. <if test="record.type != null">
  799. type = #{record.type,jdbcType=VARCHAR},
  800. </if>
  801. <if test="record.rule != null">
  802. rule = #{record.rule,jdbcType=VARCHAR},
  803. </if>
  804. <if test="record.extend != null">
  805. extend = #{record.extend,jdbcType=VARCHAR},
  806. </if>
  807. <if test="record.value != null">
  808. value = #{record.value,jdbcType=LONGVARCHAR},
  809. </if>
  810. <if test="record.content != null">
  811. content = #{record.content,jdbcType=LONGVARCHAR},
  812. </if>
  813. </trim>
  814. </otherwise>
  815. </choose>
  816. </insert>
  817. <insert id="upsert" parameterType="com.book.server.dao.entity.Config">
  818. <!--
  819. WARNING - @mbg.generated
  820. This element is automatically generated by MyBatis Generator, do not modify.
  821. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  822. -->
  823. insert into config
  824. (id, name, group, title, tip, type, rule, extend)
  825. values
  826. (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{group,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
  827. #{tip,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{rule,jdbcType=VARCHAR}, #{extend,jdbcType=VARCHAR}
  828. )
  829. on duplicate key update
  830. id = #{id,jdbcType=INTEGER},
  831. name = #{name,jdbcType=VARCHAR},
  832. group = #{group,jdbcType=VARCHAR},
  833. title = #{title,jdbcType=VARCHAR},
  834. tip = #{tip,jdbcType=VARCHAR},
  835. type = #{type,jdbcType=VARCHAR},
  836. rule = #{rule,jdbcType=VARCHAR},
  837. extend = #{extend,jdbcType=VARCHAR}
  838. </insert>
  839. <insert id="upsertWithBLOBs" parameterType="com.book.server.dao.entity.Config">
  840. <!--
  841. WARNING - @mbg.generated
  842. This element is automatically generated by MyBatis Generator, do not modify.
  843. This element was generated on Sat Aug 21 15:47:55 CST 2021.
  844. -->
  845. insert into config
  846. (id, name, group, title, tip, type, rule, extend, value, content)
  847. values
  848. (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{group,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
  849. #{tip,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{rule,jdbcType=VARCHAR}, #{extend,jdbcType=VARCHAR},
  850. #{value,jdbcType=LONGVARCHAR}, #{content,jdbcType=LONGVARCHAR})
  851. on duplicate key update
  852. id = #{id,jdbcType=INTEGER},
  853. name = #{name,jdbcType=VARCHAR},
  854. group = #{group,jdbcType=VARCHAR},
  855. title = #{title,jdbcType=VARCHAR},
  856. tip = #{tip,jdbcType=VARCHAR},
  857. type = #{type,jdbcType=VARCHAR},
  858. rule = #{rule,jdbcType=VARCHAR},
  859. extend = #{extend,jdbcType=VARCHAR},
  860. value = #{value,jdbcType=LONGVARCHAR},
  861. content = #{content,jdbcType=LONGVARCHAR}
  862. </insert>
  863. </mapper>