TLqinfoMapper.xml 14 KB

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