TbMouldEquipmentMapper.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  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.TbMouldEquipmentMapper">
  4. <resultMap id="BaseResultMap" type="com.js.kbt.model.TbMouldEquipment">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Mon Oct 28 19:24:40 CST 2019.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="equipment_name" jdbcType="VARCHAR" property="equipmentName" />
  12. <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
  13. <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
  14. <result column="use_life" jdbcType="INTEGER" property="useLife" />
  15. <result column="belong_company_id" jdbcType="INTEGER" property="belongCompanyId" />
  16. <result column="equipment_no" jdbcType="VARCHAR" property="equipmentNo" />
  17. <result column="is_use" jdbcType="INTEGER" property="isUse" />
  18. <result column="hill_number" jdbcType="VARCHAR" property="hillNumber" />
  19. <result column="lng" jdbcType="DOUBLE" property="lng" />
  20. <result column="lat" jdbcType="DOUBLE" property="lat" />
  21. <result column="temperature" jdbcType="INTEGER" property="temperature" />
  22. <result column="agent" jdbcType="VARCHAR" property="agent" />
  23. <result column="stage" jdbcType="INTEGER" property="stage" />
  24. <result column="sim" jdbcType="VARCHAR" property="sim" />
  25. <result column="curhill_number" jdbcType="VARCHAR" property="curhillNumber" />
  26. <result column="curtemperature" jdbcType="INTEGER" property="curtemperature" />
  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 Mon Oct 28 19:24:40 CST 2019.
  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 Mon Oct 28 19:24:40 CST 2019.
  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 Mon Oct 28 19:24:40 CST 2019.
  101. -->
  102. id, equipment_name, start_time, end_time, use_life, belong_company_id, equipment_no,
  103. is_use, hill_number, lng, lat, temperature, agent, stage, sim, curhill_number, curtemperature
  104. </sql>
  105. <select id="selectByExample" parameterType="com.js.kbt.model.TbMouldEquipmentExample" resultMap="BaseResultMap">
  106. <!--
  107. WARNING - @mbg.generated
  108. This element is automatically generated by MyBatis Generator, do not modify.
  109. This element was generated on Mon Oct 28 19:24:40 CST 2019.
  110. -->
  111. select
  112. <if test="distinct">
  113. distinct
  114. </if>
  115. <include refid="Base_Column_List" />
  116. from tb_mould_equipment
  117. <if test="_parameter != null">
  118. <include refid="Example_Where_Clause" />
  119. </if>
  120. <if test="orderByClause != null">
  121. order by ${orderByClause}
  122. </if>
  123. </select>
  124. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  125. <!--
  126. WARNING - @mbg.generated
  127. This element is automatically generated by MyBatis Generator, do not modify.
  128. This element was generated on Mon Oct 28 19:24:40 CST 2019.
  129. -->
  130. select
  131. <include refid="Base_Column_List" />
  132. from tb_mould_equipment
  133. where id = #{id,jdbcType=INTEGER}
  134. </select>
  135. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  136. <!--
  137. WARNING - @mbg.generated
  138. This element is automatically generated by MyBatis Generator, do not modify.
  139. This element was generated on Mon Oct 28 19:24:40 CST 2019.
  140. -->
  141. delete from tb_mould_equipment
  142. where id = #{id,jdbcType=INTEGER}
  143. </delete>
  144. <delete id="deleteByExample" parameterType="com.js.kbt.model.TbMouldEquipmentExample">
  145. <!--
  146. WARNING - @mbg.generated
  147. This element is automatically generated by MyBatis Generator, do not modify.
  148. This element was generated on Mon Oct 28 19:24:40 CST 2019.
  149. -->
  150. delete from tb_mould_equipment
  151. <if test="_parameter != null">
  152. <include refid="Example_Where_Clause" />
  153. </if>
  154. </delete>
  155. <insert id="insert" parameterType="com.js.kbt.model.TbMouldEquipment">
  156. <!--
  157. WARNING - @mbg.generated
  158. This element is automatically generated by MyBatis Generator, do not modify.
  159. This element was generated on Mon Oct 28 19:24:40 CST 2019.
  160. -->
  161. <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
  162. SELECT LAST_INSERT_ID()
  163. </selectKey>
  164. insert into tb_mould_equipment (equipment_name, start_time, end_time,
  165. use_life, belong_company_id, equipment_no,
  166. is_use, hill_number, lng,
  167. lat, temperature, agent,
  168. stage, sim, curhill_number,
  169. curtemperature)
  170. values (#{equipmentName,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
  171. #{useLife,jdbcType=INTEGER}, #{belongCompanyId,jdbcType=INTEGER}, #{equipmentNo,jdbcType=VARCHAR},
  172. #{isUse,jdbcType=INTEGER}, #{hillNumber,jdbcType=VARCHAR}, #{lng,jdbcType=DOUBLE},
  173. #{lat,jdbcType=DOUBLE}, #{temperature,jdbcType=INTEGER}, #{agent,jdbcType=VARCHAR},
  174. #{stage,jdbcType=INTEGER}, #{sim,jdbcType=VARCHAR}, #{curhillNumber,jdbcType=VARCHAR},
  175. #{curtemperature,jdbcType=INTEGER})
  176. </insert>
  177. <insert id="insertSelective" parameterType="com.js.kbt.model.TbMouldEquipment">
  178. <!--
  179. WARNING - @mbg.generated
  180. This element is automatically generated by MyBatis Generator, do not modify.
  181. This element was generated on Mon Oct 28 19:24:40 CST 2019.
  182. -->
  183. <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
  184. SELECT LAST_INSERT_ID()
  185. </selectKey>
  186. insert into tb_mould_equipment
  187. <trim prefix="(" suffix=")" suffixOverrides=",">
  188. <if test="equipmentName != null">
  189. equipment_name,
  190. </if>
  191. <if test="startTime != null">
  192. start_time,
  193. </if>
  194. <if test="endTime != null">
  195. end_time,
  196. </if>
  197. <if test="useLife != null">
  198. use_life,
  199. </if>
  200. <if test="belongCompanyId != null">
  201. belong_company_id,
  202. </if>
  203. <if test="equipmentNo != null">
  204. equipment_no,
  205. </if>
  206. <if test="isUse != null">
  207. is_use,
  208. </if>
  209. <if test="hillNumber != null">
  210. hill_number,
  211. </if>
  212. <if test="lng != null">
  213. lng,
  214. </if>
  215. <if test="lat != null">
  216. lat,
  217. </if>
  218. <if test="temperature != null">
  219. temperature,
  220. </if>
  221. <if test="agent != null">
  222. agent,
  223. </if>
  224. <if test="stage != null">
  225. stage,
  226. </if>
  227. <if test="sim != null">
  228. sim,
  229. </if>
  230. <if test="curhillNumber != null">
  231. curhill_number,
  232. </if>
  233. <if test="curtemperature != null">
  234. curtemperature,
  235. </if>
  236. </trim>
  237. <trim prefix="values (" suffix=")" suffixOverrides=",">
  238. <if test="equipmentName != null">
  239. #{equipmentName,jdbcType=VARCHAR},
  240. </if>
  241. <if test="startTime != null">
  242. #{startTime,jdbcType=TIMESTAMP},
  243. </if>
  244. <if test="endTime != null">
  245. #{endTime,jdbcType=TIMESTAMP},
  246. </if>
  247. <if test="useLife != null">
  248. #{useLife,jdbcType=INTEGER},
  249. </if>
  250. <if test="belongCompanyId != null">
  251. #{belongCompanyId,jdbcType=INTEGER},
  252. </if>
  253. <if test="equipmentNo != null">
  254. #{equipmentNo,jdbcType=VARCHAR},
  255. </if>
  256. <if test="isUse != null">
  257. #{isUse,jdbcType=INTEGER},
  258. </if>
  259. <if test="hillNumber != null">
  260. #{hillNumber,jdbcType=VARCHAR},
  261. </if>
  262. <if test="lng != null">
  263. #{lng,jdbcType=DOUBLE},
  264. </if>
  265. <if test="lat != null">
  266. #{lat,jdbcType=DOUBLE},
  267. </if>
  268. <if test="temperature != null">
  269. #{temperature,jdbcType=INTEGER},
  270. </if>
  271. <if test="agent != null">
  272. #{agent,jdbcType=VARCHAR},
  273. </if>
  274. <if test="stage != null">
  275. #{stage,jdbcType=INTEGER},
  276. </if>
  277. <if test="sim != null">
  278. #{sim,jdbcType=VARCHAR},
  279. </if>
  280. <if test="curhillNumber != null">
  281. #{curhillNumber,jdbcType=VARCHAR},
  282. </if>
  283. <if test="curtemperature != null">
  284. #{curtemperature,jdbcType=INTEGER},
  285. </if>
  286. </trim>
  287. </insert>
  288. <select id="countByExample" parameterType="com.js.kbt.model.TbMouldEquipmentExample" resultType="java.lang.Long">
  289. <!--
  290. WARNING - @mbg.generated
  291. This element is automatically generated by MyBatis Generator, do not modify.
  292. This element was generated on Mon Oct 28 19:24:40 CST 2019.
  293. -->
  294. select count(*) from tb_mould_equipment
  295. <if test="_parameter != null">
  296. <include refid="Example_Where_Clause" />
  297. </if>
  298. </select>
  299. <update id="updateByExampleSelective" parameterType="map">
  300. <!--
  301. WARNING - @mbg.generated
  302. This element is automatically generated by MyBatis Generator, do not modify.
  303. This element was generated on Mon Oct 28 19:24:40 CST 2019.
  304. -->
  305. update tb_mould_equipment
  306. <set>
  307. <if test="record.id != null">
  308. id = #{record.id,jdbcType=INTEGER},
  309. </if>
  310. <if test="record.equipmentName != null">
  311. equipment_name = #{record.equipmentName,jdbcType=VARCHAR},
  312. </if>
  313. <if test="record.startTime != null">
  314. start_time = #{record.startTime,jdbcType=TIMESTAMP},
  315. </if>
  316. <if test="record.endTime != null">
  317. end_time = #{record.endTime,jdbcType=TIMESTAMP},
  318. </if>
  319. <if test="record.useLife != null">
  320. use_life = #{record.useLife,jdbcType=INTEGER},
  321. </if>
  322. <if test="record.belongCompanyId != null">
  323. belong_company_id = #{record.belongCompanyId,jdbcType=INTEGER},
  324. </if>
  325. <if test="record.equipmentNo != null">
  326. equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
  327. </if>
  328. <if test="record.isUse != null">
  329. is_use = #{record.isUse,jdbcType=INTEGER},
  330. </if>
  331. <if test="record.hillNumber != null">
  332. hill_number = #{record.hillNumber,jdbcType=VARCHAR},
  333. </if>
  334. <if test="record.lng != null">
  335. lng = #{record.lng,jdbcType=DOUBLE},
  336. </if>
  337. <if test="record.lat != null">
  338. lat = #{record.lat,jdbcType=DOUBLE},
  339. </if>
  340. <if test="record.temperature != null">
  341. temperature = #{record.temperature,jdbcType=INTEGER},
  342. </if>
  343. <if test="record.agent != null">
  344. agent = #{record.agent,jdbcType=VARCHAR},
  345. </if>
  346. <if test="record.stage != null">
  347. stage = #{record.stage,jdbcType=INTEGER},
  348. </if>
  349. <if test="record.sim != null">
  350. sim = #{record.sim,jdbcType=VARCHAR},
  351. </if>
  352. <if test="record.curhillNumber != null">
  353. curhill_number = #{record.curhillNumber,jdbcType=VARCHAR},
  354. </if>
  355. <if test="record.curtemperature != null">
  356. curtemperature = #{record.curtemperature,jdbcType=INTEGER},
  357. </if>
  358. </set>
  359. <if test="_parameter != null">
  360. <include refid="Update_By_Example_Where_Clause" />
  361. </if>
  362. </update>
  363. <update id="updateByExample" parameterType="map">
  364. <!--
  365. WARNING - @mbg.generated
  366. This element is automatically generated by MyBatis Generator, do not modify.
  367. This element was generated on Mon Oct 28 19:24:40 CST 2019.
  368. -->
  369. update tb_mould_equipment
  370. set id = #{record.id,jdbcType=INTEGER},
  371. equipment_name = #{record.equipmentName,jdbcType=VARCHAR},
  372. start_time = #{record.startTime,jdbcType=TIMESTAMP},
  373. end_time = #{record.endTime,jdbcType=TIMESTAMP},
  374. use_life = #{record.useLife,jdbcType=INTEGER},
  375. belong_company_id = #{record.belongCompanyId,jdbcType=INTEGER},
  376. equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
  377. is_use = #{record.isUse,jdbcType=INTEGER},
  378. hill_number = #{record.hillNumber,jdbcType=VARCHAR},
  379. lng = #{record.lng,jdbcType=DOUBLE},
  380. lat = #{record.lat,jdbcType=DOUBLE},
  381. temperature = #{record.temperature,jdbcType=INTEGER},
  382. agent = #{record.agent,jdbcType=VARCHAR},
  383. stage = #{record.stage,jdbcType=INTEGER},
  384. sim = #{record.sim,jdbcType=VARCHAR},
  385. curhill_number = #{record.curhillNumber,jdbcType=VARCHAR},
  386. curtemperature = #{record.curtemperature,jdbcType=INTEGER}
  387. <if test="_parameter != null">
  388. <include refid="Update_By_Example_Where_Clause" />
  389. </if>
  390. </update>
  391. <update id="updateByPrimaryKeySelective" parameterType="com.js.kbt.model.TbMouldEquipment">
  392. <!--
  393. WARNING - @mbg.generated
  394. This element is automatically generated by MyBatis Generator, do not modify.
  395. This element was generated on Mon Oct 28 19:24:40 CST 2019.
  396. -->
  397. update tb_mould_equipment
  398. <set>
  399. <if test="equipmentName != null">
  400. equipment_name = #{equipmentName,jdbcType=VARCHAR},
  401. </if>
  402. <if test="startTime != null">
  403. start_time = #{startTime,jdbcType=TIMESTAMP},
  404. </if>
  405. <if test="endTime != null">
  406. end_time = #{endTime,jdbcType=TIMESTAMP},
  407. </if>
  408. <if test="useLife != null">
  409. use_life = #{useLife,jdbcType=INTEGER},
  410. </if>
  411. <if test="belongCompanyId != null">
  412. belong_company_id = #{belongCompanyId,jdbcType=INTEGER},
  413. </if>
  414. <if test="equipmentNo != null">
  415. equipment_no = #{equipmentNo,jdbcType=VARCHAR},
  416. </if>
  417. <if test="isUse != null">
  418. is_use = #{isUse,jdbcType=INTEGER},
  419. </if>
  420. <if test="hillNumber != null">
  421. hill_number = #{hillNumber,jdbcType=VARCHAR},
  422. </if>
  423. <if test="lng != null">
  424. lng = #{lng,jdbcType=DOUBLE},
  425. </if>
  426. <if test="lat != null">
  427. lat = #{lat,jdbcType=DOUBLE},
  428. </if>
  429. <if test="temperature != null">
  430. temperature = #{temperature,jdbcType=INTEGER},
  431. </if>
  432. <if test="agent != null">
  433. agent = #{agent,jdbcType=VARCHAR},
  434. </if>
  435. <if test="stage != null">
  436. stage = #{stage,jdbcType=INTEGER},
  437. </if>
  438. <if test="sim != null">
  439. sim = #{sim,jdbcType=VARCHAR},
  440. </if>
  441. <if test="curhillNumber != null">
  442. curhill_number = #{curhillNumber,jdbcType=VARCHAR},
  443. </if>
  444. <if test="curtemperature != null">
  445. curtemperature = #{curtemperature,jdbcType=INTEGER},
  446. </if>
  447. </set>
  448. where id = #{id,jdbcType=INTEGER}
  449. </update>
  450. <update id="updateByPrimaryKey" parameterType="com.js.kbt.model.TbMouldEquipment">
  451. <!--
  452. WARNING - @mbg.generated
  453. This element is automatically generated by MyBatis Generator, do not modify.
  454. This element was generated on Mon Oct 28 19:24:40 CST 2019.
  455. -->
  456. update tb_mould_equipment
  457. set equipment_name = #{equipmentName,jdbcType=VARCHAR},
  458. start_time = #{startTime,jdbcType=TIMESTAMP},
  459. end_time = #{endTime,jdbcType=TIMESTAMP},
  460. use_life = #{useLife,jdbcType=INTEGER},
  461. belong_company_id = #{belongCompanyId,jdbcType=INTEGER},
  462. equipment_no = #{equipmentNo,jdbcType=VARCHAR},
  463. is_use = #{isUse,jdbcType=INTEGER},
  464. hill_number = #{hillNumber,jdbcType=VARCHAR},
  465. lng = #{lng,jdbcType=DOUBLE},
  466. lat = #{lat,jdbcType=DOUBLE},
  467. temperature = #{temperature,jdbcType=INTEGER},
  468. agent = #{agent,jdbcType=VARCHAR},
  469. stage = #{stage,jdbcType=INTEGER},
  470. sim = #{sim,jdbcType=VARCHAR},
  471. curhill_number = #{curhillNumber,jdbcType=VARCHAR},
  472. curtemperature = #{curtemperature,jdbcType=INTEGER}
  473. where id = #{id,jdbcType=INTEGER}
  474. </update>
  475. </mapper>