LiftMapper.xml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  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="cn.com.ty.lift.mapper.LiftMapper" >
  4. <resultMap id="BaseResultMap" type="Lift" >
  5. <id column="id" property="id" jdbcType="BIGINT" />
  6. <result column="registration_code" property="registrationCode" jdbcType="VARCHAR" />
  7. <result column="category" property="category" jdbcType="TINYINT" />
  8. <result column="type" property="type" jdbcType="INTEGER" />
  9. <result column="code" property="code" jdbcType="CHAR" />
  10. <result column="manufacture_date" property="manufactureDate" jdbcType="DATE" />
  11. <result column="factory_code" property="factoryCode" jdbcType="VARCHAR" />
  12. <result column="usage" property="usage" jdbcType="TINYINT" />
  13. <result column="brand" property="brand" jdbcType="VARCHAR" />
  14. <result column="install_company" property="installCompany" jdbcType="VARCHAR" />
  15. <result column="model" property="model" jdbcType="VARCHAR" />
  16. <result column="pulley_diameter" property="pulleyDiameter" jdbcType="DECIMAL" />
  17. <result column="rope_num" property="ropeNum" jdbcType="INTEGER" />
  18. <result column="lock_model" property="lockModel" jdbcType="VARCHAR" />
  19. <result column="rated_load" property="ratedLoad" jdbcType="INTEGER" />
  20. <result column="promote_height" property="promoteHeight" jdbcType="DECIMAL" />
  21. <result column="step_width" property="stepWidth" jdbcType="DECIMAL" />
  22. <result column="sidewalk_length" property="sidewalkLength" jdbcType="DECIMAL" />
  23. <result column="tilt_angle" property="tiltAngle" jdbcType="DECIMAL" />
  24. <result column="motor_power" property="motorPower" jdbcType="DECIMAL" />
  25. <result column="rated_speed" property="ratedSpeed" jdbcType="DECIMAL" />
  26. <result column="layer_station_door" property="layerStationDoor" jdbcType="VARCHAR" />
  27. <result column="clamp_type" property="clampType" jdbcType="TINYINT" />
  28. <result column="reform_company" property="reformCompany" jdbcType="VARCHAR" />
  29. <result column="position" property="position" jdbcType="VARCHAR" />
  30. <result column="coordinate" property="coordinate" jdbcType="VARCHAR" />
  31. <result column="remarks" property="remarks" jdbcType="VARCHAR" />
  32. <result column="creator_id" property="creatorId" jdbcType="BIGINT" />
  33. <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
  34. <result column="steel_belt" property="steelBelt" jdbcType="INTEGER" />
  35. <result column="cylinder_type" property="cylinderType" jdbcType="VARCHAR" />
  36. <result column="cylinder_num" property="cylinderNum" jdbcType="INTEGER" />
  37. <result column="top_type" property="topType" jdbcType="TINYINT" />
  38. <result column="control_type" property="controlType" jdbcType="VARCHAR" />
  39. <result column="mpa" property="mpa" jdbcType="INTEGER" />
  40. <result column="factory" property="factory" jdbcType="VARCHAR" />
  41. <result column="code1" property="code1" jdbcType="VARCHAR" />
  42. <result column="use_company_code" property="useCompanyCode" jdbcType="VARCHAR" />
  43. </resultMap>
  44. <sql id="Base_Column_List" >
  45. id, registration_code, category, type, code, manufacture_date, factory_code, usage,
  46. brand, install_company, model, pulley_diameter, rope_num, lock_model, rated_load,
  47. promote_height, step_width, sidewalk_length, tilt_angle, motor_power, rated_speed,
  48. layer_station_door, clamp_type, reform_company, position, coordinate, remarks, creator_id,
  49. create_date, steel_belt, cylinder_type, cylinder_num, top_type, control_type, mpa,
  50. factory, code1, use_company_code
  51. </sql>
  52. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
  53. select
  54. <include refid="Base_Column_List" />
  55. from lift
  56. where id = #{id,jdbcType=BIGINT}
  57. </select>
  58. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
  59. delete from lift
  60. where id = #{id,jdbcType=BIGINT}
  61. </delete>
  62. <insert id="insert" parameterType="cn.com.ty.lift.entity.Lift" >
  63. insert into lift (id, registration_code, category,
  64. type, code, manufacture_date,
  65. factory_code, usage, brand,
  66. install_company, model, pulley_diameter,
  67. rope_num, lock_model, rated_load,
  68. promote_height, step_width, sidewalk_length,
  69. tilt_angle, motor_power, rated_speed,
  70. layer_station_door, clamp_type, reform_company,
  71. position, coordinate, remarks,
  72. creator_id, create_date, steel_belt,
  73. cylinder_type, cylinder_num, top_type,
  74. control_type, mpa, factory,
  75. code1, use_company_code)
  76. values (#{id,jdbcType=BIGINT}, #{registrationCode,jdbcType=VARCHAR}, #{category,jdbcType=TINYINT},
  77. #{type,jdbcType=INTEGER}, #{code,jdbcType=CHAR}, #{manufactureDate,jdbcType=DATE},
  78. #{factoryCode,jdbcType=VARCHAR}, #{usage,jdbcType=TINYINT}, #{brand,jdbcType=VARCHAR},
  79. #{installCompany,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR}, #{pulleyDiameter,jdbcType=DECIMAL},
  80. #{ropeNum,jdbcType=INTEGER}, #{lockModel,jdbcType=VARCHAR}, #{ratedLoad,jdbcType=INTEGER},
  81. #{promoteHeight,jdbcType=DECIMAL}, #{stepWidth,jdbcType=DECIMAL}, #{sidewalkLength,jdbcType=DECIMAL},
  82. #{tiltAngle,jdbcType=DECIMAL}, #{motorPower,jdbcType=DECIMAL}, #{ratedSpeed,jdbcType=DECIMAL},
  83. #{layerStationDoor,jdbcType=VARCHAR}, #{clampType,jdbcType=TINYINT}, #{reformCompany,jdbcType=VARCHAR},
  84. #{position,jdbcType=VARCHAR}, #{coordinate,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},
  85. #{creatorId,jdbcType=BIGINT}, #{createDate,jdbcType=TIMESTAMP}, #{steelBelt,jdbcType=INTEGER},
  86. #{cylinderType,jdbcType=VARCHAR}, #{cylinderNum,jdbcType=INTEGER}, #{topType,jdbcType=TINYINT},
  87. #{controlType,jdbcType=VARCHAR}, #{mpa,jdbcType=INTEGER}, #{factory,jdbcType=VARCHAR},
  88. #{code1,jdbcType=VARCHAR}, #{useCompanyCode,jdbcType=VARCHAR})
  89. </insert>
  90. <insert id="insertSelective" parameterType="cn.com.ty.lift.entity.Lift" >
  91. insert into lift
  92. <trim prefix="(" suffix=")" suffixOverrides="," >
  93. <if test="id != null" >
  94. id,
  95. </if>
  96. <if test="registrationCode != null" >
  97. registration_code,
  98. </if>
  99. <if test="category != null" >
  100. category,
  101. </if>
  102. <if test="type != null" >
  103. type,
  104. </if>
  105. <if test="code != null" >
  106. code,
  107. </if>
  108. <if test="manufactureDate != null" >
  109. manufacture_date,
  110. </if>
  111. <if test="factoryCode != null" >
  112. factory_code,
  113. </if>
  114. <if test="usage != null" >
  115. usage,
  116. </if>
  117. <if test="brand != null" >
  118. brand,
  119. </if>
  120. <if test="installCompany != null" >
  121. install_company,
  122. </if>
  123. <if test="model != null" >
  124. model,
  125. </if>
  126. <if test="pulleyDiameter != null" >
  127. pulley_diameter,
  128. </if>
  129. <if test="ropeNum != null" >
  130. rope_num,
  131. </if>
  132. <if test="lockModel != null" >
  133. lock_model,
  134. </if>
  135. <if test="ratedLoad != null" >
  136. rated_load,
  137. </if>
  138. <if test="promoteHeight != null" >
  139. promote_height,
  140. </if>
  141. <if test="stepWidth != null" >
  142. step_width,
  143. </if>
  144. <if test="sidewalkLength != null" >
  145. sidewalk_length,
  146. </if>
  147. <if test="tiltAngle != null" >
  148. tilt_angle,
  149. </if>
  150. <if test="motorPower != null" >
  151. motor_power,
  152. </if>
  153. <if test="ratedSpeed != null" >
  154. rated_speed,
  155. </if>
  156. <if test="layerStationDoor != null" >
  157. layer_station_door,
  158. </if>
  159. <if test="clampType != null" >
  160. clamp_type,
  161. </if>
  162. <if test="reformCompany != null" >
  163. reform_company,
  164. </if>
  165. <if test="position != null" >
  166. position,
  167. </if>
  168. <if test="coordinate != null" >
  169. coordinate,
  170. </if>
  171. <if test="remarks != null" >
  172. remarks,
  173. </if>
  174. <if test="creatorId != null" >
  175. creator_id,
  176. </if>
  177. <if test="createDate != null" >
  178. create_date,
  179. </if>
  180. <if test="steelBelt != null" >
  181. steel_belt,
  182. </if>
  183. <if test="cylinderType != null" >
  184. cylinder_type,
  185. </if>
  186. <if test="cylinderNum != null" >
  187. cylinder_num,
  188. </if>
  189. <if test="topType != null" >
  190. top_type,
  191. </if>
  192. <if test="controlType != null" >
  193. control_type,
  194. </if>
  195. <if test="mpa != null" >
  196. mpa,
  197. </if>
  198. <if test="factory != null" >
  199. factory,
  200. </if>
  201. <if test="code1 != null" >
  202. code1,
  203. </if>
  204. <if test="useCompanyCode != null" >
  205. use_company_code,
  206. </if>
  207. </trim>
  208. <trim prefix="values (" suffix=")" suffixOverrides="," >
  209. <if test="id != null" >
  210. #{id,jdbcType=BIGINT},
  211. </if>
  212. <if test="registrationCode != null" >
  213. #{registrationCode,jdbcType=VARCHAR},
  214. </if>
  215. <if test="category != null" >
  216. #{category,jdbcType=TINYINT},
  217. </if>
  218. <if test="type != null" >
  219. #{type,jdbcType=INTEGER},
  220. </if>
  221. <if test="code != null" >
  222. #{code,jdbcType=CHAR},
  223. </if>
  224. <if test="manufactureDate != null" >
  225. #{manufactureDate,jdbcType=DATE},
  226. </if>
  227. <if test="factoryCode != null" >
  228. #{factoryCode,jdbcType=VARCHAR},
  229. </if>
  230. <if test="usage != null" >
  231. #{usage,jdbcType=TINYINT},
  232. </if>
  233. <if test="brand != null" >
  234. #{brand,jdbcType=VARCHAR},
  235. </if>
  236. <if test="installCompany != null" >
  237. #{installCompany,jdbcType=VARCHAR},
  238. </if>
  239. <if test="model != null" >
  240. #{model,jdbcType=VARCHAR},
  241. </if>
  242. <if test="pulleyDiameter != null" >
  243. #{pulleyDiameter,jdbcType=DECIMAL},
  244. </if>
  245. <if test="ropeNum != null" >
  246. #{ropeNum,jdbcType=INTEGER},
  247. </if>
  248. <if test="lockModel != null" >
  249. #{lockModel,jdbcType=VARCHAR},
  250. </if>
  251. <if test="ratedLoad != null" >
  252. #{ratedLoad,jdbcType=INTEGER},
  253. </if>
  254. <if test="promoteHeight != null" >
  255. #{promoteHeight,jdbcType=DECIMAL},
  256. </if>
  257. <if test="stepWidth != null" >
  258. #{stepWidth,jdbcType=DECIMAL},
  259. </if>
  260. <if test="sidewalkLength != null" >
  261. #{sidewalkLength,jdbcType=DECIMAL},
  262. </if>
  263. <if test="tiltAngle != null" >
  264. #{tiltAngle,jdbcType=DECIMAL},
  265. </if>
  266. <if test="motorPower != null" >
  267. #{motorPower,jdbcType=DECIMAL},
  268. </if>
  269. <if test="ratedSpeed != null" >
  270. #{ratedSpeed,jdbcType=DECIMAL},
  271. </if>
  272. <if test="layerStationDoor != null" >
  273. #{layerStationDoor,jdbcType=VARCHAR},
  274. </if>
  275. <if test="clampType != null" >
  276. #{clampType,jdbcType=TINYINT},
  277. </if>
  278. <if test="reformCompany != null" >
  279. #{reformCompany,jdbcType=VARCHAR},
  280. </if>
  281. <if test="position != null" >
  282. #{position,jdbcType=VARCHAR},
  283. </if>
  284. <if test="coordinate != null" >
  285. #{coordinate,jdbcType=VARCHAR},
  286. </if>
  287. <if test="remarks != null" >
  288. #{remarks,jdbcType=VARCHAR},
  289. </if>
  290. <if test="creatorId != null" >
  291. #{creatorId,jdbcType=BIGINT},
  292. </if>
  293. <if test="createDate != null" >
  294. #{createDate,jdbcType=TIMESTAMP},
  295. </if>
  296. <if test="steelBelt != null" >
  297. #{steelBelt,jdbcType=INTEGER},
  298. </if>
  299. <if test="cylinderType != null" >
  300. #{cylinderType,jdbcType=VARCHAR},
  301. </if>
  302. <if test="cylinderNum != null" >
  303. #{cylinderNum,jdbcType=INTEGER},
  304. </if>
  305. <if test="topType != null" >
  306. #{topType,jdbcType=TINYINT},
  307. </if>
  308. <if test="controlType != null" >
  309. #{controlType,jdbcType=VARCHAR},
  310. </if>
  311. <if test="mpa != null" >
  312. #{mpa,jdbcType=INTEGER},
  313. </if>
  314. <if test="factory != null" >
  315. #{factory,jdbcType=VARCHAR},
  316. </if>
  317. <if test="code1 != null" >
  318. #{code1,jdbcType=VARCHAR},
  319. </if>
  320. <if test="useCompanyCode != null" >
  321. #{useCompanyCode,jdbcType=VARCHAR},
  322. </if>
  323. </trim>
  324. </insert>
  325. <update id="updateByPrimaryKeySelective" parameterType="cn.com.ty.lift.entity.Lift" >
  326. update lift
  327. <set >
  328. <if test="registrationCode != null" >
  329. registration_code = #{registrationCode,jdbcType=VARCHAR},
  330. </if>
  331. <if test="category != null" >
  332. category = #{category,jdbcType=TINYINT},
  333. </if>
  334. <if test="type != null" >
  335. type = #{type,jdbcType=INTEGER},
  336. </if>
  337. <if test="code != null" >
  338. code = #{code,jdbcType=CHAR},
  339. </if>
  340. <if test="manufactureDate != null" >
  341. manufacture_date = #{manufactureDate,jdbcType=DATE},
  342. </if>
  343. <if test="factoryCode != null" >
  344. factory_code = #{factoryCode,jdbcType=VARCHAR},
  345. </if>
  346. <if test="usage != null" >
  347. usage = #{usage,jdbcType=TINYINT},
  348. </if>
  349. <if test="brand != null" >
  350. brand = #{brand,jdbcType=VARCHAR},
  351. </if>
  352. <if test="installCompany != null" >
  353. install_company = #{installCompany,jdbcType=VARCHAR},
  354. </if>
  355. <if test="model != null" >
  356. model = #{model,jdbcType=VARCHAR},
  357. </if>
  358. <if test="pulleyDiameter != null" >
  359. pulley_diameter = #{pulleyDiameter,jdbcType=DECIMAL},
  360. </if>
  361. <if test="ropeNum != null" >
  362. rope_num = #{ropeNum,jdbcType=INTEGER},
  363. </if>
  364. <if test="lockModel != null" >
  365. lock_model = #{lockModel,jdbcType=VARCHAR},
  366. </if>
  367. <if test="ratedLoad != null" >
  368. rated_load = #{ratedLoad,jdbcType=INTEGER},
  369. </if>
  370. <if test="promoteHeight != null" >
  371. promote_height = #{promoteHeight,jdbcType=DECIMAL},
  372. </if>
  373. <if test="stepWidth != null" >
  374. step_width = #{stepWidth,jdbcType=DECIMAL},
  375. </if>
  376. <if test="sidewalkLength != null" >
  377. sidewalk_length = #{sidewalkLength,jdbcType=DECIMAL},
  378. </if>
  379. <if test="tiltAngle != null" >
  380. tilt_angle = #{tiltAngle,jdbcType=DECIMAL},
  381. </if>
  382. <if test="motorPower != null" >
  383. motor_power = #{motorPower,jdbcType=DECIMAL},
  384. </if>
  385. <if test="ratedSpeed != null" >
  386. rated_speed = #{ratedSpeed,jdbcType=DECIMAL},
  387. </if>
  388. <if test="layerStationDoor != null" >
  389. layer_station_door = #{layerStationDoor,jdbcType=VARCHAR},
  390. </if>
  391. <if test="clampType != null" >
  392. clamp_type = #{clampType,jdbcType=TINYINT},
  393. </if>
  394. <if test="reformCompany != null" >
  395. reform_company = #{reformCompany,jdbcType=VARCHAR},
  396. </if>
  397. <if test="position != null" >
  398. position = #{position,jdbcType=VARCHAR},
  399. </if>
  400. <if test="coordinate != null" >
  401. coordinate = #{coordinate,jdbcType=VARCHAR},
  402. </if>
  403. <if test="remarks != null" >
  404. remarks = #{remarks,jdbcType=VARCHAR},
  405. </if>
  406. <if test="creatorId != null" >
  407. creator_id = #{creatorId,jdbcType=BIGINT},
  408. </if>
  409. <if test="createDate != null" >
  410. create_date = #{createDate,jdbcType=TIMESTAMP},
  411. </if>
  412. <if test="steelBelt != null" >
  413. steel_belt = #{steelBelt,jdbcType=INTEGER},
  414. </if>
  415. <if test="cylinderType != null" >
  416. cylinder_type = #{cylinderType,jdbcType=VARCHAR},
  417. </if>
  418. <if test="cylinderNum != null" >
  419. cylinder_num = #{cylinderNum,jdbcType=INTEGER},
  420. </if>
  421. <if test="topType != null" >
  422. top_type = #{topType,jdbcType=TINYINT},
  423. </if>
  424. <if test="controlType != null" >
  425. control_type = #{controlType,jdbcType=VARCHAR},
  426. </if>
  427. <if test="mpa != null" >
  428. mpa = #{mpa,jdbcType=INTEGER},
  429. </if>
  430. <if test="factory != null" >
  431. factory = #{factory,jdbcType=VARCHAR},
  432. </if>
  433. <if test="code1 != null" >
  434. code1 = #{code1,jdbcType=VARCHAR},
  435. </if>
  436. <if test="useCompanyCode != null" >
  437. use_company_code = #{useCompanyCode,jdbcType=VARCHAR},
  438. </if>
  439. </set>
  440. where id = #{id,jdbcType=BIGINT}
  441. </update>
  442. <update id="updateByPrimaryKey" parameterType="cn.com.ty.lift.entity.Lift" >
  443. update lift
  444. set registration_code = #{registrationCode,jdbcType=VARCHAR},
  445. category = #{category,jdbcType=TINYINT},
  446. type = #{type,jdbcType=INTEGER},
  447. code = #{code,jdbcType=CHAR},
  448. manufacture_date = #{manufactureDate,jdbcType=DATE},
  449. factory_code = #{factoryCode,jdbcType=VARCHAR},
  450. usage = #{usage,jdbcType=TINYINT},
  451. brand = #{brand,jdbcType=VARCHAR},
  452. install_company = #{installCompany,jdbcType=VARCHAR},
  453. model = #{model,jdbcType=VARCHAR},
  454. pulley_diameter = #{pulleyDiameter,jdbcType=DECIMAL},
  455. rope_num = #{ropeNum,jdbcType=INTEGER},
  456. lock_model = #{lockModel,jdbcType=VARCHAR},
  457. rated_load = #{ratedLoad,jdbcType=INTEGER},
  458. promote_height = #{promoteHeight,jdbcType=DECIMAL},
  459. step_width = #{stepWidth,jdbcType=DECIMAL},
  460. sidewalk_length = #{sidewalkLength,jdbcType=DECIMAL},
  461. tilt_angle = #{tiltAngle,jdbcType=DECIMAL},
  462. motor_power = #{motorPower,jdbcType=DECIMAL},
  463. rated_speed = #{ratedSpeed,jdbcType=DECIMAL},
  464. layer_station_door = #{layerStationDoor,jdbcType=VARCHAR},
  465. clamp_type = #{clampType,jdbcType=TINYINT},
  466. reform_company = #{reformCompany,jdbcType=VARCHAR},
  467. position = #{position,jdbcType=VARCHAR},
  468. coordinate = #{coordinate,jdbcType=VARCHAR},
  469. remarks = #{remarks,jdbcType=VARCHAR},
  470. creator_id = #{creatorId,jdbcType=BIGINT},
  471. create_date = #{createDate,jdbcType=TIMESTAMP},
  472. steel_belt = #{steelBelt,jdbcType=INTEGER},
  473. cylinder_type = #{cylinderType,jdbcType=VARCHAR},
  474. cylinder_num = #{cylinderNum,jdbcType=INTEGER},
  475. top_type = #{topType,jdbcType=TINYINT},
  476. control_type = #{controlType,jdbcType=VARCHAR},
  477. mpa = #{mpa,jdbcType=INTEGER},
  478. factory = #{factory,jdbcType=VARCHAR},
  479. code1 = #{code1,jdbcType=VARCHAR},
  480. use_company_code = #{useCompanyCode,jdbcType=VARCHAR}
  481. where id = #{id,jdbcType=BIGINT}
  482. </update>
  483. </mapper>