TKtinfoMapper.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.TKtinfoMapper" >
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.basicdata.model.TKtinfo" >
  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="currenttemp" property="currenttemp" jdbcType="DECIMAL" />
  13. <result column="currentmode" property="currentmode" jdbcType="INTEGER" />
  14. <result column="currentspeed" property="currentspeed" jdbcType="DECIMAL" />
  15. <result column="intemp" property="intemp" jdbcType="DECIMAL" />
  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, vdevname, idevtdh, sitecode, vcfcode, currenttemp, currentmode,
  82. currentspeed, intemp, valarmstatue, vstatue, updatetime, remark, del_flag
  83. </sql>
  84. <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TKtinfoExample" >
  85. select
  86. <if test="distinct" >
  87. distinct
  88. </if>
  89. <include refid="Base_Column_List" />
  90. from t_ktinfo
  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_ktinfo
  102. where id = #{id,jdbcType=VARCHAR}
  103. </select>
  104. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  105. delete from t_ktinfo
  106. where id = #{id,jdbcType=VARCHAR}
  107. </delete>
  108. <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.basicdata.model.TKtinfoExample" >
  109. delete from t_ktinfo
  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.TKtinfo" >
  115. insert into t_ktinfo (id, org_id, vdevcode,
  116. vdevname, idevtdh, sitecode,
  117. vcfcode, currenttemp, currentmode,
  118. currentspeed, intemp, valarmstatue,
  119. vstatue, updatetime, remark,
  120. del_flag)
  121. values (#{id,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{vdevcode,jdbcType=VARCHAR},
  122. #{vdevname,jdbcType=VARCHAR}, #{idevtdh,jdbcType=INTEGER}, #{sitecode,jdbcType=VARCHAR},
  123. #{vcfcode,jdbcType=VARCHAR}, #{currenttemp,jdbcType=DECIMAL}, #{currentmode,jdbcType=INTEGER},
  124. #{currentspeed,jdbcType=DECIMAL}, #{intemp,jdbcType=DECIMAL}, #{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.TKtinfo" >
  129. insert into t_ktinfo
  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="vdevname != null" >
  141. vdevname,
  142. </if>
  143. <if test="idevtdh != null" >
  144. idevtdh,
  145. </if>
  146. <if test="sitecode != null" >
  147. sitecode,
  148. </if>
  149. <if test="vcfcode != null" >
  150. vcfcode,
  151. </if>
  152. <if test="currenttemp != null" >
  153. currenttemp,
  154. </if>
  155. <if test="currentmode != null" >
  156. currentmode,
  157. </if>
  158. <if test="currentspeed != null" >
  159. currentspeed,
  160. </if>
  161. <if test="intemp != null" >
  162. intemp,
  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="vdevname != null" >
  191. #{vdevname,jdbcType=VARCHAR},
  192. </if>
  193. <if test="idevtdh != null" >
  194. #{idevtdh,jdbcType=INTEGER},
  195. </if>
  196. <if test="sitecode != null" >
  197. #{sitecode,jdbcType=VARCHAR},
  198. </if>
  199. <if test="vcfcode != null" >
  200. #{vcfcode,jdbcType=VARCHAR},
  201. </if>
  202. <if test="currenttemp != null" >
  203. #{currenttemp,jdbcType=DECIMAL},
  204. </if>
  205. <if test="currentmode != null" >
  206. #{currentmode,jdbcType=INTEGER},
  207. </if>
  208. <if test="currentspeed != null" >
  209. #{currentspeed,jdbcType=DECIMAL},
  210. </if>
  211. <if test="intemp != null" >
  212. #{intemp,jdbcType=DECIMAL},
  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.TKtinfoExample" resultType="java.lang.Integer" >
  232. select count(*) from t_ktinfo
  233. <if test="_parameter != null" >
  234. <include refid="Example_Where_Clause" />
  235. </if>
  236. </select>
  237. <update id="updateByExampleSelective" parameterType="map" >
  238. update t_ktinfo
  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.vdevname != null" >
  250. vdevname = #{record.vdevname,jdbcType=VARCHAR},
  251. </if>
  252. <if test="record.idevtdh != null" >
  253. idevtdh = #{record.idevtdh,jdbcType=INTEGER},
  254. </if>
  255. <if test="record.sitecode != null" >
  256. sitecode = #{record.sitecode,jdbcType=VARCHAR},
  257. </if>
  258. <if test="record.vcfcode != null" >
  259. vcfcode = #{record.vcfcode,jdbcType=VARCHAR},
  260. </if>
  261. <if test="record.currenttemp != null" >
  262. currenttemp = #{record.currenttemp,jdbcType=DECIMAL},
  263. </if>
  264. <if test="record.currentmode != null" >
  265. currentmode = #{record.currentmode,jdbcType=INTEGER},
  266. </if>
  267. <if test="record.currentspeed != null" >
  268. currentspeed = #{record.currentspeed,jdbcType=DECIMAL},
  269. </if>
  270. <if test="record.intemp != null" >
  271. intemp = #{record.intemp,jdbcType=DECIMAL},
  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_ktinfo
  295. set id = #{record.id,jdbcType=VARCHAR},
  296. org_id = #{record.orgId,jdbcType=VARCHAR},
  297. vdevcode = #{record.vdevcode,jdbcType=VARCHAR},
  298. vdevname = #{record.vdevname,jdbcType=VARCHAR},
  299. idevtdh = #{record.idevtdh,jdbcType=INTEGER},
  300. sitecode = #{record.sitecode,jdbcType=VARCHAR},
  301. vcfcode = #{record.vcfcode,jdbcType=VARCHAR},
  302. currenttemp = #{record.currenttemp,jdbcType=DECIMAL},
  303. currentmode = #{record.currentmode,jdbcType=INTEGER},
  304. currentspeed = #{record.currentspeed,jdbcType=DECIMAL},
  305. intemp = #{record.intemp,jdbcType=DECIMAL},
  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.TKtinfo" >
  316. update t_ktinfo
  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="vdevname != null" >
  325. vdevname = #{vdevname,jdbcType=VARCHAR},
  326. </if>
  327. <if test="idevtdh != null" >
  328. idevtdh = #{idevtdh,jdbcType=INTEGER},
  329. </if>
  330. <if test="sitecode != null" >
  331. sitecode = #{sitecode,jdbcType=VARCHAR},
  332. </if>
  333. <if test="vcfcode != null" >
  334. vcfcode = #{vcfcode,jdbcType=VARCHAR},
  335. </if>
  336. <if test="currenttemp != null" >
  337. currenttemp = #{currenttemp,jdbcType=DECIMAL},
  338. </if>
  339. <if test="currentmode != null" >
  340. currentmode = #{currentmode,jdbcType=INTEGER},
  341. </if>
  342. <if test="currentspeed != null" >
  343. currentspeed = #{currentspeed,jdbcType=DECIMAL},
  344. </if>
  345. <if test="intemp != null" >
  346. intemp = #{intemp,jdbcType=DECIMAL},
  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.TKtinfo" >
  367. update t_ktinfo
  368. set org_id = #{orgId,jdbcType=VARCHAR},
  369. vdevcode = #{vdevcode,jdbcType=VARCHAR},
  370. vdevname = #{vdevname,jdbcType=VARCHAR},
  371. idevtdh = #{idevtdh,jdbcType=INTEGER},
  372. sitecode = #{sitecode,jdbcType=VARCHAR},
  373. vcfcode = #{vcfcode,jdbcType=VARCHAR},
  374. currenttemp = #{currenttemp,jdbcType=DECIMAL},
  375. currentmode = #{currentmode,jdbcType=INTEGER},
  376. currentspeed = #{currentspeed,jdbcType=DECIMAL},
  377. intemp = #{intemp,jdbcType=DECIMAL},
  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>