TNtinfoMapper.xml 16 KB

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