TNRoomInfoMapper.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  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.chinaitop.depot.intelligent.basicdata.mapper.TNRoomInfoMapper" >
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.basicdata.model.TNRoomInfo" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="org_id" property="orgId" jdbcType="VARCHAR" />
  7. <result column="vdevcode" property="vdevcode" jdbcType="VARCHAR" />
  8. <result column="nitrogenhouse" property="nitrogenhouse" jdbcType="VARCHAR" />
  9. <result column="sitecode" property="sitecode" jdbcType="VARCHAR" />
  10. <result column="purity" property="purity" jdbcType="DECIMAL" />
  11. <result column="temperature" property="temperature" jdbcType="DECIMAL" />
  12. <result column="pressure" property="pressure" jdbcType="DECIMAL" />
  13. <result column="flow" property="flow" jdbcType="DECIMAL" />
  14. <result column="signal" property="signal" jdbcType="VARCHAR" />
  15. <result column="airsignal" property="airsignal" jdbcType="VARCHAR" />
  16. <result column="valarmstatue" property="valarmstatue" jdbcType="INTEGER" />
  17. <result column="vstatue" property="vstatue" jdbcType="INTEGER" />
  18. <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
  19. <result column="remark" property="remark" jdbcType="VARCHAR" />
  20. <result column="del_flag" property="delFlag" jdbcType="INTEGER" />
  21. </resultMap>
  22. <sql id="Example_Where_Clause" >
  23. <where >
  24. <foreach collection="oredCriteria" item="criteria" separator="or" >
  25. <if test="criteria.valid" >
  26. <trim prefix="(" suffix=")" prefixOverrides="and" >
  27. <foreach collection="criteria.criteria" item="criterion" >
  28. <choose >
  29. <when test="criterion.noValue" >
  30. and ${criterion.condition}
  31. </when>
  32. <when test="criterion.singleValue" >
  33. and ${criterion.condition} #{criterion.value}
  34. </when>
  35. <when test="criterion.betweenValue" >
  36. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  37. </when>
  38. <when test="criterion.listValue" >
  39. and ${criterion.condition}
  40. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  41. #{listItem}
  42. </foreach>
  43. </when>
  44. </choose>
  45. </foreach>
  46. </trim>
  47. </if>
  48. </foreach>
  49. </where>
  50. </sql>
  51. <sql id="Update_By_Example_Where_Clause" >
  52. <where >
  53. <foreach collection="example.oredCriteria" item="criteria" separator="or" >
  54. <if test="criteria.valid" >
  55. <trim prefix="(" suffix=")" prefixOverrides="and" >
  56. <foreach collection="criteria.criteria" item="criterion" >
  57. <choose >
  58. <when test="criterion.noValue" >
  59. and ${criterion.condition}
  60. </when>
  61. <when test="criterion.singleValue" >
  62. and ${criterion.condition} #{criterion.value}
  63. </when>
  64. <when test="criterion.betweenValue" >
  65. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  66. </when>
  67. <when test="criterion.listValue" >
  68. and ${criterion.condition}
  69. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  70. #{listItem}
  71. </foreach>
  72. </when>
  73. </choose>
  74. </foreach>
  75. </trim>
  76. </if>
  77. </foreach>
  78. </where>
  79. </sql>
  80. <sql id="Base_Column_List" >
  81. id, org_id, vdevcode, nitrogenhouse, sitecode, purity, temperature, pressure, flow,
  82. `signal`, airsignal, valarmstatue, vstatue, updatetime, remark, del_flag
  83. </sql>
  84. <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TNRoomInfoExample" >
  85. select
  86. <if test="distinct" >
  87. distinct
  88. </if>
  89. <include refid="Base_Column_List" />
  90. from t_n_room_info
  91. <if test="_parameter != null" >
  92. <include refid="Example_Where_Clause" />
  93. </if>
  94. <if test="orderByClause != null" >
  95. order by ${orderByClause}
  96. </if>
  97. </select>
  98. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  99. select
  100. <include refid="Base_Column_List" />
  101. from t_n_room_info
  102. where id = #{id,jdbcType=VARCHAR}
  103. </select>
  104. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  105. delete from t_n_room_info
  106. where id = #{id,jdbcType=VARCHAR}
  107. </delete>
  108. <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TNRoomInfoExample" >
  109. delete from t_n_room_info
  110. <if test="_parameter != null" >
  111. <include refid="Example_Where_Clause" />
  112. </if>
  113. </delete>
  114. <insert id="insert" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TNRoomInfo" >
  115. insert into t_n_room_info (id, org_id, vdevcode,
  116. nitrogenhouse, sitecode, purity,
  117. temperature, pressure, flow,
  118. `signal`, airsignal, valarmstatue,
  119. vstatue, updatetime, remark,
  120. del_flag)
  121. values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{vdevcode,jdbcType=VARCHAR},
  122. #{nitrogenhouse,jdbcType=VARCHAR}, #{sitecode,jdbcType=VARCHAR}, #{purity,jdbcType=DECIMAL},
  123. #{temperature,jdbcType=DECIMAL}, #{pressure,jdbcType=DECIMAL}, #{flow,jdbcType=DECIMAL},
  124. #{signal,jdbcType=VARCHAR}, #{airsignal,jdbcType=VARCHAR}, #{valarmstatue,jdbcType=INTEGER},
  125. #{vstatue,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR},
  126. #{delFlag,jdbcType=INTEGER})
  127. </insert>
  128. <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TNRoomInfo" >
  129. insert into t_n_room_info
  130. <trim prefix="(" suffix=")" suffixOverrides="," >
  131. <if test="id != null" >
  132. id,
  133. </if>
  134. <if test="orgId != null" >
  135. org_id,
  136. </if>
  137. <if test="vdevcode != null" >
  138. vdevcode,
  139. </if>
  140. <if test="nitrogenhouse != null" >
  141. nitrogenhouse,
  142. </if>
  143. <if test="sitecode != null" >
  144. sitecode,
  145. </if>
  146. <if test="purity != null" >
  147. purity,
  148. </if>
  149. <if test="temperature != null" >
  150. temperature,
  151. </if>
  152. <if test="pressure != null" >
  153. pressure,
  154. </if>
  155. <if test="flow != null" >
  156. flow,
  157. </if>
  158. <if test="signal != null" >
  159. `signal`,
  160. </if>
  161. <if test="airsignal != null" >
  162. airsignal,
  163. </if>
  164. <if test="valarmstatue != null" >
  165. valarmstatue,
  166. </if>
  167. <if test="vstatue != null" >
  168. vstatue,
  169. </if>
  170. <if test="updatetime != null" >
  171. updatetime,
  172. </if>
  173. <if test="remark != null" >
  174. remark,
  175. </if>
  176. <if test="delFlag != null" >
  177. del_flag,
  178. </if>
  179. </trim>
  180. <trim prefix="values (" suffix=")" suffixOverrides="," >
  181. <if test="id != null" >
  182. #{id,jdbcType=VARCHAR},
  183. </if>
  184. <if test="orgId != null" >
  185. #{orgId,jdbcType=VARCHAR},
  186. </if>
  187. <if test="vdevcode != null" >
  188. #{vdevcode,jdbcType=VARCHAR},
  189. </if>
  190. <if test="nitrogenhouse != null" >
  191. #{nitrogenhouse,jdbcType=VARCHAR},
  192. </if>
  193. <if test="sitecode != null" >
  194. #{sitecode,jdbcType=VARCHAR},
  195. </if>
  196. <if test="purity != null" >
  197. #{purity,jdbcType=DECIMAL},
  198. </if>
  199. <if test="temperature != null" >
  200. #{temperature,jdbcType=DECIMAL},
  201. </if>
  202. <if test="pressure != null" >
  203. #{pressure,jdbcType=DECIMAL},
  204. </if>
  205. <if test="flow != null" >
  206. #{flow,jdbcType=DECIMAL},
  207. </if>
  208. <if test="signal != null" >
  209. #{signal,jdbcType=VARCHAR},
  210. </if>
  211. <if test="airsignal != null" >
  212. #{airsignal,jdbcType=VARCHAR},
  213. </if>
  214. <if test="valarmstatue != null" >
  215. #{valarmstatue,jdbcType=INTEGER},
  216. </if>
  217. <if test="vstatue != null" >
  218. #{vstatue,jdbcType=INTEGER},
  219. </if>
  220. <if test="updatetime != null" >
  221. #{updatetime,jdbcType=TIMESTAMP},
  222. </if>
  223. <if test="remark != null" >
  224. #{remark,jdbcType=VARCHAR},
  225. </if>
  226. <if test="delFlag != null" >
  227. #{delFlag,jdbcType=INTEGER},
  228. </if>
  229. </trim>
  230. </insert>
  231. <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TNRoomInfoExample" resultType="java.lang.Integer" >
  232. select count(*) from t_n_room_info
  233. <if test="_parameter != null" >
  234. <include refid="Example_Where_Clause" />
  235. </if>
  236. </select>
  237. <update id="updateByExampleSelective" parameterType="map" >
  238. update t_n_room_info
  239. <set >
  240. <if test="record.id != null" >
  241. id = #{record.id,jdbcType=VARCHAR},
  242. </if>
  243. <if test="record.orgId != null" >
  244. org_id = #{record.orgId,jdbcType=VARCHAR},
  245. </if>
  246. <if test="record.vdevcode != null" >
  247. vdevcode = #{record.vdevcode,jdbcType=VARCHAR},
  248. </if>
  249. <if test="record.nitrogenhouse != null" >
  250. nitrogenhouse = #{record.nitrogenhouse,jdbcType=VARCHAR},
  251. </if>
  252. <if test="record.sitecode != null" >
  253. sitecode = #{record.sitecode,jdbcType=VARCHAR},
  254. </if>
  255. <if test="record.purity != null" >
  256. purity = #{record.purity,jdbcType=DECIMAL},
  257. </if>
  258. <if test="record.temperature != null" >
  259. temperature = #{record.temperature,jdbcType=DECIMAL},
  260. </if>
  261. <if test="record.pressure != null" >
  262. pressure = #{record.pressure,jdbcType=DECIMAL},
  263. </if>
  264. <if test="record.flow != null" >
  265. flow = #{record.flow,jdbcType=DECIMAL},
  266. </if>
  267. <if test="record.signal != null" >
  268. `signal` = #{record.signal,jdbcType=VARCHAR},
  269. </if>
  270. <if test="record.airsignal != null" >
  271. airsignal = #{record.airsignal,jdbcType=VARCHAR},
  272. </if>
  273. <if test="record.valarmstatue != null" >
  274. valarmstatue = #{record.valarmstatue,jdbcType=INTEGER},
  275. </if>
  276. <if test="record.vstatue != null" >
  277. vstatue = #{record.vstatue,jdbcType=INTEGER},
  278. </if>
  279. <if test="record.updatetime != null" >
  280. updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
  281. </if>
  282. <if test="record.remark != null" >
  283. remark = #{record.remark,jdbcType=VARCHAR},
  284. </if>
  285. <if test="record.delFlag != null" >
  286. del_flag = #{record.delFlag,jdbcType=INTEGER},
  287. </if>
  288. </set>
  289. <if test="_parameter != null" >
  290. <include refid="Update_By_Example_Where_Clause" />
  291. </if>
  292. </update>
  293. <update id="updateByExample" parameterType="map" >
  294. update t_n_room_info
  295. set id = #{record.id,jdbcType=VARCHAR},
  296. org_id = #{record.orgId,jdbcType=VARCHAR},
  297. vdevcode = #{record.vdevcode,jdbcType=VARCHAR},
  298. nitrogenhouse = #{record.nitrogenhouse,jdbcType=VARCHAR},
  299. sitecode = #{record.sitecode,jdbcType=VARCHAR},
  300. purity = #{record.purity,jdbcType=DECIMAL},
  301. temperature = #{record.temperature,jdbcType=DECIMAL},
  302. pressure = #{record.pressure,jdbcType=DECIMAL},
  303. flow = #{record.flow,jdbcType=DECIMAL},
  304. `signal` = #{record.signal,jdbcType=VARCHAR},
  305. airsignal = #{record.airsignal,jdbcType=VARCHAR},
  306. valarmstatue = #{record.valarmstatue,jdbcType=INTEGER},
  307. vstatue = #{record.vstatue,jdbcType=INTEGER},
  308. updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
  309. remark = #{record.remark,jdbcType=VARCHAR},
  310. del_flag = #{record.delFlag,jdbcType=INTEGER}
  311. <if test="_parameter != null" >
  312. <include refid="Update_By_Example_Where_Clause" />
  313. </if>
  314. </update>
  315. <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TNRoomInfo" >
  316. update t_n_room_info
  317. <set >
  318. <if test="orgId != null" >
  319. org_id = #{orgId,jdbcType=VARCHAR},
  320. </if>
  321. <if test="vdevcode != null" >
  322. vdevcode = #{vdevcode,jdbcType=VARCHAR},
  323. </if>
  324. <if test="nitrogenhouse != null" >
  325. nitrogenhouse = #{nitrogenhouse,jdbcType=VARCHAR},
  326. </if>
  327. <if test="sitecode != null" >
  328. sitecode = #{sitecode,jdbcType=VARCHAR},
  329. </if>
  330. <if test="purity != null" >
  331. purity = #{purity,jdbcType=DECIMAL},
  332. </if>
  333. <if test="temperature != null" >
  334. temperature = #{temperature,jdbcType=DECIMAL},
  335. </if>
  336. <if test="pressure != null" >
  337. pressure = #{pressure,jdbcType=DECIMAL},
  338. </if>
  339. <if test="flow != null" >
  340. flow = #{flow,jdbcType=DECIMAL},
  341. </if>
  342. <if test="signal != null" >
  343. `signal` = #{signal,jdbcType=VARCHAR},
  344. </if>
  345. <if test="airsignal != null" >
  346. airsignal = #{airsignal,jdbcType=VARCHAR},
  347. </if>
  348. <if test="valarmstatue != null" >
  349. valarmstatue = #{valarmstatue,jdbcType=INTEGER},
  350. </if>
  351. <if test="vstatue != null" >
  352. vstatue = #{vstatue,jdbcType=INTEGER},
  353. </if>
  354. <if test="updatetime != null" >
  355. updatetime = #{updatetime,jdbcType=TIMESTAMP},
  356. </if>
  357. <if test="remark != null" >
  358. remark = #{remark,jdbcType=VARCHAR},
  359. </if>
  360. <if test="delFlag != null" >
  361. del_flag = #{delFlag,jdbcType=INTEGER},
  362. </if>
  363. </set>
  364. where id = #{id,jdbcType=VARCHAR}
  365. </update>
  366. <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TNRoomInfo" >
  367. update t_n_room_info
  368. set org_id = #{orgId,jdbcType=VARCHAR},
  369. vdevcode = #{vdevcode,jdbcType=VARCHAR},
  370. nitrogenhouse = #{nitrogenhouse,jdbcType=VARCHAR},
  371. sitecode = #{sitecode,jdbcType=VARCHAR},
  372. purity = #{purity,jdbcType=DECIMAL},
  373. temperature = #{temperature,jdbcType=DECIMAL},
  374. pressure = #{pressure,jdbcType=DECIMAL},
  375. flow = #{flow,jdbcType=DECIMAL},
  376. `signal` = #{signal,jdbcType=VARCHAR},
  377. airsignal = #{airsignal,jdbcType=VARCHAR},
  378. valarmstatue = #{valarmstatue,jdbcType=INTEGER},
  379. vstatue = #{vstatue,jdbcType=INTEGER},
  380. updatetime = #{updatetime,jdbcType=TIMESTAMP},
  381. remark = #{remark,jdbcType=VARCHAR},
  382. del_flag = #{delFlag,jdbcType=INTEGER}
  383. where id = #{id,jdbcType=VARCHAR}
  384. </update>
  385. </mapper>