MouldHistoryMapper.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  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.js.kbt.mapper.MouldHistoryMapper">
  4. <resultMap id="BaseResultMap" type="com.js.kbt.model.MouldHistory">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  9. -->
  10. <id column="id" jdbcType="BIGINT" property="id" />
  11. <result column="sim" jdbcType="VARCHAR" property="sim" />
  12. <result column="model_no" jdbcType="VARCHAR" property="modelNo" />
  13. <result column="version" jdbcType="VARCHAR" property="version" />
  14. <result column="status" jdbcType="VARCHAR" property="status" />
  15. <result column="lng" jdbcType="VARCHAR" property="lng" />
  16. <result column="lat" jdbcType="VARCHAR" property="lat" />
  17. <result column="gprs_lac" jdbcType="VARCHAR" property="gprsLac" />
  18. <result column="gprs_ic" jdbcType="VARCHAR" property="gprsIc" />
  19. <result column="wifi_bbsid" jdbcType="VARCHAR" property="wifiBbsid" />
  20. <result column="temperature" jdbcType="INTEGER" property="temperature" />
  21. <result column="battery" jdbcType="INTEGER" property="battery" />
  22. <result column="sig_2g" jdbcType="INTEGER" property="sig2g" />
  23. <result column="sig_nb" jdbcType="INTEGER" property="sigNb" />
  24. <result column="sig_wifi" jdbcType="INTEGER" property="sigWifi" />
  25. <result column="ext0" jdbcType="VARCHAR" property="ext0" />
  26. <result column="alarm" jdbcType="INTEGER" property="alarm" />
  27. <result column="run_cnt" jdbcType="INTEGER" property="runCnt" />
  28. <result column="crc_code" jdbcType="VARCHAR" property="crcCode" />
  29. <result column="indate" jdbcType="TIMESTAMP" property="indate" />
  30. </resultMap>
  31. <sql id="Example_Where_Clause">
  32. <!--
  33. WARNING - @mbg.generated
  34. This element is automatically generated by MyBatis Generator, do not modify.
  35. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  36. -->
  37. <where>
  38. <foreach collection="oredCriteria" item="criteria" separator="or">
  39. <if test="criteria.valid">
  40. <trim prefix="(" prefixOverrides="and" suffix=")">
  41. <foreach collection="criteria.criteria" item="criterion">
  42. <choose>
  43. <when test="criterion.noValue">
  44. and ${criterion.condition}
  45. </when>
  46. <when test="criterion.singleValue">
  47. and ${criterion.condition} #{criterion.value}
  48. </when>
  49. <when test="criterion.betweenValue">
  50. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  51. </when>
  52. <when test="criterion.listValue">
  53. and ${criterion.condition}
  54. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  55. #{listItem}
  56. </foreach>
  57. </when>
  58. </choose>
  59. </foreach>
  60. </trim>
  61. </if>
  62. </foreach>
  63. </where>
  64. </sql>
  65. <sql id="Update_By_Example_Where_Clause">
  66. <!--
  67. WARNING - @mbg.generated
  68. This element is automatically generated by MyBatis Generator, do not modify.
  69. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  70. -->
  71. <where>
  72. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  73. <if test="criteria.valid">
  74. <trim prefix="(" prefixOverrides="and" suffix=")">
  75. <foreach collection="criteria.criteria" item="criterion">
  76. <choose>
  77. <when test="criterion.noValue">
  78. and ${criterion.condition}
  79. </when>
  80. <when test="criterion.singleValue">
  81. and ${criterion.condition} #{criterion.value}
  82. </when>
  83. <when test="criterion.betweenValue">
  84. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  85. </when>
  86. <when test="criterion.listValue">
  87. and ${criterion.condition}
  88. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  89. #{listItem}
  90. </foreach>
  91. </when>
  92. </choose>
  93. </foreach>
  94. </trim>
  95. </if>
  96. </foreach>
  97. </where>
  98. </sql>
  99. <sql id="Base_Column_List">
  100. <!--
  101. WARNING - @mbg.generated
  102. This element is automatically generated by MyBatis Generator, do not modify.
  103. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  104. -->
  105. id, sim, model_no, version, status, lng, lat, gprs_lac, gprs_ic, wifi_bbsid, temperature,
  106. battery, sig_2g, sig_nb, sig_wifi, ext0, alarm, run_cnt, crc_code, indate
  107. </sql>
  108. <select id="selectByExample" parameterType="com.js.kbt.model.MouldHistoryExample" resultMap="BaseResultMap">
  109. <!--
  110. WARNING - @mbg.generated
  111. This element is automatically generated by MyBatis Generator, do not modify.
  112. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  113. -->
  114. select
  115. <if test="distinct">
  116. distinct
  117. </if>
  118. <include refid="Base_Column_List" />
  119. from mould_history
  120. <if test="_parameter != null">
  121. <include refid="Example_Where_Clause" />
  122. </if>
  123. <if test="orderByClause != null">
  124. order by ${orderByClause}
  125. </if>
  126. </select>
  127. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  128. <!--
  129. WARNING - @mbg.generated
  130. This element is automatically generated by MyBatis Generator, do not modify.
  131. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  132. -->
  133. select
  134. <include refid="Base_Column_List" />
  135. from mould_history
  136. where id = #{id,jdbcType=BIGINT}
  137. </select>
  138. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  139. <!--
  140. WARNING - @mbg.generated
  141. This element is automatically generated by MyBatis Generator, do not modify.
  142. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  143. -->
  144. delete from mould_history
  145. where id = #{id,jdbcType=BIGINT}
  146. </delete>
  147. <delete id="deleteByExample" parameterType="com.js.kbt.model.MouldHistoryExample">
  148. <!--
  149. WARNING - @mbg.generated
  150. This element is automatically generated by MyBatis Generator, do not modify.
  151. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  152. -->
  153. delete from mould_history
  154. <if test="_parameter != null">
  155. <include refid="Example_Where_Clause" />
  156. </if>
  157. </delete>
  158. <insert id="insert" parameterType="com.js.kbt.model.MouldHistory">
  159. <!--
  160. WARNING - @mbg.generated
  161. This element is automatically generated by MyBatis Generator, do not modify.
  162. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  163. -->
  164. <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
  165. SELECT LAST_INSERT_ID()
  166. </selectKey>
  167. insert into mould_history (sim, model_no, version,
  168. status, lng, lat, gprs_lac,
  169. gprs_ic, wifi_bbsid, temperature,
  170. battery, sig_2g, sig_nb,
  171. sig_wifi, ext0, alarm,
  172. run_cnt, crc_code, indate
  173. )
  174. values (#{sim,jdbcType=VARCHAR}, #{modelNo,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR},
  175. #{status,jdbcType=VARCHAR}, #{lng,jdbcType=VARCHAR}, #{lat,jdbcType=VARCHAR}, #{gprsLac,jdbcType=VARCHAR},
  176. #{gprsIc,jdbcType=VARCHAR}, #{wifiBbsid,jdbcType=VARCHAR}, #{temperature,jdbcType=INTEGER},
  177. #{battery,jdbcType=INTEGER}, #{sig2g,jdbcType=INTEGER}, #{sigNb,jdbcType=INTEGER},
  178. #{sigWifi,jdbcType=INTEGER}, #{ext0,jdbcType=VARCHAR}, #{alarm,jdbcType=INTEGER},
  179. #{runCnt,jdbcType=INTEGER}, #{crcCode,jdbcType=VARCHAR}, #{indate,jdbcType=TIMESTAMP}
  180. )
  181. </insert>
  182. <insert id="insertSelective" parameterType="com.js.kbt.model.MouldHistory">
  183. <!--
  184. WARNING - @mbg.generated
  185. This element is automatically generated by MyBatis Generator, do not modify.
  186. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  187. -->
  188. <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
  189. SELECT LAST_INSERT_ID()
  190. </selectKey>
  191. insert into mould_history
  192. <trim prefix="(" suffix=")" suffixOverrides=",">
  193. <if test="sim != null">
  194. sim,
  195. </if>
  196. <if test="modelNo != null">
  197. model_no,
  198. </if>
  199. <if test="version != null">
  200. version,
  201. </if>
  202. <if test="status != null">
  203. status,
  204. </if>
  205. <if test="lng != null">
  206. lng,
  207. </if>
  208. <if test="lat != null">
  209. lat,
  210. </if>
  211. <if test="gprsLac != null">
  212. gprs_lac,
  213. </if>
  214. <if test="gprsIc != null">
  215. gprs_ic,
  216. </if>
  217. <if test="wifiBbsid != null">
  218. wifi_bbsid,
  219. </if>
  220. <if test="temperature != null">
  221. temperature,
  222. </if>
  223. <if test="battery != null">
  224. battery,
  225. </if>
  226. <if test="sig2g != null">
  227. sig_2g,
  228. </if>
  229. <if test="sigNb != null">
  230. sig_nb,
  231. </if>
  232. <if test="sigWifi != null">
  233. sig_wifi,
  234. </if>
  235. <if test="ext0 != null">
  236. ext0,
  237. </if>
  238. <if test="alarm != null">
  239. alarm,
  240. </if>
  241. <if test="runCnt != null">
  242. run_cnt,
  243. </if>
  244. <if test="crcCode != null">
  245. crc_code,
  246. </if>
  247. <if test="indate != null">
  248. indate,
  249. </if>
  250. </trim>
  251. <trim prefix="values (" suffix=")" suffixOverrides=",">
  252. <if test="sim != null">
  253. #{sim,jdbcType=VARCHAR},
  254. </if>
  255. <if test="modelNo != null">
  256. #{modelNo,jdbcType=VARCHAR},
  257. </if>
  258. <if test="version != null">
  259. #{version,jdbcType=VARCHAR},
  260. </if>
  261. <if test="status != null">
  262. #{status,jdbcType=VARCHAR},
  263. </if>
  264. <if test="lng != null">
  265. #{lng,jdbcType=VARCHAR},
  266. </if>
  267. <if test="lat != null">
  268. #{lat,jdbcType=VARCHAR},
  269. </if>
  270. <if test="gprsLac != null">
  271. #{gprsLac,jdbcType=VARCHAR},
  272. </if>
  273. <if test="gprsIc != null">
  274. #{gprsIc,jdbcType=VARCHAR},
  275. </if>
  276. <if test="wifiBbsid != null">
  277. #{wifiBbsid,jdbcType=VARCHAR},
  278. </if>
  279. <if test="temperature != null">
  280. #{temperature,jdbcType=INTEGER},
  281. </if>
  282. <if test="battery != null">
  283. #{battery,jdbcType=INTEGER},
  284. </if>
  285. <if test="sig2g != null">
  286. #{sig2g,jdbcType=INTEGER},
  287. </if>
  288. <if test="sigNb != null">
  289. #{sigNb,jdbcType=INTEGER},
  290. </if>
  291. <if test="sigWifi != null">
  292. #{sigWifi,jdbcType=INTEGER},
  293. </if>
  294. <if test="ext0 != null">
  295. #{ext0,jdbcType=VARCHAR},
  296. </if>
  297. <if test="alarm != null">
  298. #{alarm,jdbcType=INTEGER},
  299. </if>
  300. <if test="runCnt != null">
  301. #{runCnt,jdbcType=INTEGER},
  302. </if>
  303. <if test="crcCode != null">
  304. #{crcCode,jdbcType=VARCHAR},
  305. </if>
  306. <if test="indate != null">
  307. #{indate,jdbcType=TIMESTAMP},
  308. </if>
  309. </trim>
  310. </insert>
  311. <select id="countByExample" parameterType="com.js.kbt.model.MouldHistoryExample" resultType="java.lang.Long">
  312. <!--
  313. WARNING - @mbg.generated
  314. This element is automatically generated by MyBatis Generator, do not modify.
  315. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  316. -->
  317. select count(*) from mould_history
  318. <if test="_parameter != null">
  319. <include refid="Example_Where_Clause" />
  320. </if>
  321. </select>
  322. <update id="updateByExampleSelective" parameterType="map">
  323. <!--
  324. WARNING - @mbg.generated
  325. This element is automatically generated by MyBatis Generator, do not modify.
  326. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  327. -->
  328. update mould_history
  329. <set>
  330. <if test="record.id != null">
  331. id = #{record.id,jdbcType=BIGINT},
  332. </if>
  333. <if test="record.sim != null">
  334. sim = #{record.sim,jdbcType=VARCHAR},
  335. </if>
  336. <if test="record.modelNo != null">
  337. model_no = #{record.modelNo,jdbcType=VARCHAR},
  338. </if>
  339. <if test="record.version != null">
  340. version = #{record.version,jdbcType=VARCHAR},
  341. </if>
  342. <if test="record.status != null">
  343. status = #{record.status,jdbcType=VARCHAR},
  344. </if>
  345. <if test="record.lng != null">
  346. lng = #{record.lng,jdbcType=VARCHAR},
  347. </if>
  348. <if test="record.lat != null">
  349. lat = #{record.lat,jdbcType=VARCHAR},
  350. </if>
  351. <if test="record.gprsLac != null">
  352. gprs_lac = #{record.gprsLac,jdbcType=VARCHAR},
  353. </if>
  354. <if test="record.gprsIc != null">
  355. gprs_ic = #{record.gprsIc,jdbcType=VARCHAR},
  356. </if>
  357. <if test="record.wifiBbsid != null">
  358. wifi_bbsid = #{record.wifiBbsid,jdbcType=VARCHAR},
  359. </if>
  360. <if test="record.temperature != null">
  361. temperature = #{record.temperature,jdbcType=INTEGER},
  362. </if>
  363. <if test="record.battery != null">
  364. battery = #{record.battery,jdbcType=INTEGER},
  365. </if>
  366. <if test="record.sig2g != null">
  367. sig_2g = #{record.sig2g,jdbcType=INTEGER},
  368. </if>
  369. <if test="record.sigNb != null">
  370. sig_nb = #{record.sigNb,jdbcType=INTEGER},
  371. </if>
  372. <if test="record.sigWifi != null">
  373. sig_wifi = #{record.sigWifi,jdbcType=INTEGER},
  374. </if>
  375. <if test="record.ext0 != null">
  376. ext0 = #{record.ext0,jdbcType=VARCHAR},
  377. </if>
  378. <if test="record.alarm != null">
  379. alarm = #{record.alarm,jdbcType=INTEGER},
  380. </if>
  381. <if test="record.runCnt != null">
  382. run_cnt = #{record.runCnt,jdbcType=INTEGER},
  383. </if>
  384. <if test="record.crcCode != null">
  385. crc_code = #{record.crcCode,jdbcType=VARCHAR},
  386. </if>
  387. <if test="record.indate != null">
  388. indate = #{record.indate,jdbcType=TIMESTAMP},
  389. </if>
  390. </set>
  391. <if test="_parameter != null">
  392. <include refid="Update_By_Example_Where_Clause" />
  393. </if>
  394. </update>
  395. <update id="updateByExample" parameterType="map">
  396. <!--
  397. WARNING - @mbg.generated
  398. This element is automatically generated by MyBatis Generator, do not modify.
  399. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  400. -->
  401. update mould_history
  402. set id = #{record.id,jdbcType=BIGINT},
  403. sim = #{record.sim,jdbcType=VARCHAR},
  404. model_no = #{record.modelNo,jdbcType=VARCHAR},
  405. version = #{record.version,jdbcType=VARCHAR},
  406. status = #{record.status,jdbcType=VARCHAR},
  407. lng = #{record.lng,jdbcType=VARCHAR},
  408. lat = #{record.lat,jdbcType=VARCHAR},
  409. gprs_lac = #{record.gprsLac,jdbcType=VARCHAR},
  410. gprs_ic = #{record.gprsIc,jdbcType=VARCHAR},
  411. wifi_bbsid = #{record.wifiBbsid,jdbcType=VARCHAR},
  412. temperature = #{record.temperature,jdbcType=INTEGER},
  413. battery = #{record.battery,jdbcType=INTEGER},
  414. sig_2g = #{record.sig2g,jdbcType=INTEGER},
  415. sig_nb = #{record.sigNb,jdbcType=INTEGER},
  416. sig_wifi = #{record.sigWifi,jdbcType=INTEGER},
  417. ext0 = #{record.ext0,jdbcType=VARCHAR},
  418. alarm = #{record.alarm,jdbcType=INTEGER},
  419. run_cnt = #{record.runCnt,jdbcType=INTEGER},
  420. crc_code = #{record.crcCode,jdbcType=VARCHAR},
  421. indate = #{record.indate,jdbcType=TIMESTAMP}
  422. <if test="_parameter != null">
  423. <include refid="Update_By_Example_Where_Clause" />
  424. </if>
  425. </update>
  426. <update id="updateByPrimaryKeySelective" parameterType="com.js.kbt.model.MouldHistory">
  427. <!--
  428. WARNING - @mbg.generated
  429. This element is automatically generated by MyBatis Generator, do not modify.
  430. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  431. -->
  432. update mould_history
  433. <set>
  434. <if test="sim != null">
  435. sim = #{sim,jdbcType=VARCHAR},
  436. </if>
  437. <if test="modelNo != null">
  438. model_no = #{modelNo,jdbcType=VARCHAR},
  439. </if>
  440. <if test="version != null">
  441. version = #{version,jdbcType=VARCHAR},
  442. </if>
  443. <if test="status != null">
  444. status = #{status,jdbcType=VARCHAR},
  445. </if>
  446. <if test="lng != null">
  447. lng = #{lng,jdbcType=VARCHAR},
  448. </if>
  449. <if test="lat != null">
  450. lat = #{lat,jdbcType=VARCHAR},
  451. </if>
  452. <if test="gprsLac != null">
  453. gprs_lac = #{gprsLac,jdbcType=VARCHAR},
  454. </if>
  455. <if test="gprsIc != null">
  456. gprs_ic = #{gprsIc,jdbcType=VARCHAR},
  457. </if>
  458. <if test="wifiBbsid != null">
  459. wifi_bbsid = #{wifiBbsid,jdbcType=VARCHAR},
  460. </if>
  461. <if test="temperature != null">
  462. temperature = #{temperature,jdbcType=INTEGER},
  463. </if>
  464. <if test="battery != null">
  465. battery = #{battery,jdbcType=INTEGER},
  466. </if>
  467. <if test="sig2g != null">
  468. sig_2g = #{sig2g,jdbcType=INTEGER},
  469. </if>
  470. <if test="sigNb != null">
  471. sig_nb = #{sigNb,jdbcType=INTEGER},
  472. </if>
  473. <if test="sigWifi != null">
  474. sig_wifi = #{sigWifi,jdbcType=INTEGER},
  475. </if>
  476. <if test="ext0 != null">
  477. ext0 = #{ext0,jdbcType=VARCHAR},
  478. </if>
  479. <if test="alarm != null">
  480. alarm = #{alarm,jdbcType=INTEGER},
  481. </if>
  482. <if test="runCnt != null">
  483. run_cnt = #{runCnt,jdbcType=INTEGER},
  484. </if>
  485. <if test="crcCode != null">
  486. crc_code = #{crcCode,jdbcType=VARCHAR},
  487. </if>
  488. <if test="indate != null">
  489. indate = #{indate,jdbcType=TIMESTAMP},
  490. </if>
  491. </set>
  492. where id = #{id,jdbcType=BIGINT}
  493. </update>
  494. <update id="updateByPrimaryKey" parameterType="com.js.kbt.model.MouldHistory">
  495. <!--
  496. WARNING - @mbg.generated
  497. This element is automatically generated by MyBatis Generator, do not modify.
  498. This element was generated on Thu Aug 01 15:49:20 CST 2019.
  499. -->
  500. update mould_history
  501. set sim = #{sim,jdbcType=VARCHAR},
  502. model_no = #{modelNo,jdbcType=VARCHAR},
  503. version = #{version,jdbcType=VARCHAR},
  504. status = #{status,jdbcType=VARCHAR},
  505. lng = #{lng,jdbcType=VARCHAR},
  506. lat = #{lat,jdbcType=VARCHAR},
  507. gprs_lac = #{gprsLac,jdbcType=VARCHAR},
  508. gprs_ic = #{gprsIc,jdbcType=VARCHAR},
  509. wifi_bbsid = #{wifiBbsid,jdbcType=VARCHAR},
  510. temperature = #{temperature,jdbcType=INTEGER},
  511. battery = #{battery,jdbcType=INTEGER},
  512. sig_2g = #{sig2g,jdbcType=INTEGER},
  513. sig_nb = #{sigNb,jdbcType=INTEGER},
  514. sig_wifi = #{sigWifi,jdbcType=INTEGER},
  515. ext0 = #{ext0,jdbcType=VARCHAR},
  516. alarm = #{alarm,jdbcType=INTEGER},
  517. run_cnt = #{runCnt,jdbcType=INTEGER},
  518. crc_code = #{crcCode,jdbcType=VARCHAR},
  519. indate = #{indate,jdbcType=TIMESTAMP}
  520. where id = #{id,jdbcType=BIGINT}
  521. </update>
  522. </mapper>