TQtdevinfoMapper.xml 15 KB

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