MouldDownPacketMapper.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  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.js.kbt.mapper.MouldDownPacketMapper">
  4. <resultMap id="BaseResultMap" type="com.js.kbt.model.MouldDownPacket">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="equipment_no" jdbcType="VARCHAR" property="equipmentNo" />
  12. <result column="packet_str" jdbcType="VARCHAR" property="packetStr" />
  13. <result column="indate" jdbcType="TIMESTAMP" property="indate" />
  14. <result column="is_use" jdbcType="INTEGER" property="isUse" />
  15. <result column="threshold" jdbcType="VARCHAR" property="threshold" />
  16. </resultMap>
  17. <sql id="Example_Where_Clause">
  18. <!--
  19. WARNING - @mbg.generated
  20. This element is automatically generated by MyBatis Generator, do not modify.
  21. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  22. -->
  23. <where>
  24. <foreach collection="oredCriteria" item="criteria" separator="or">
  25. <if test="criteria.valid">
  26. <trim prefix="(" prefixOverrides="and" suffix=")">
  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 close=")" collection="criterion.value" item="listItem" open="(" 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. <!--
  53. WARNING - @mbg.generated
  54. This element is automatically generated by MyBatis Generator, do not modify.
  55. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  56. -->
  57. <where>
  58. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  59. <if test="criteria.valid">
  60. <trim prefix="(" prefixOverrides="and" suffix=")">
  61. <foreach collection="criteria.criteria" item="criterion">
  62. <choose>
  63. <when test="criterion.noValue">
  64. and ${criterion.condition}
  65. </when>
  66. <when test="criterion.singleValue">
  67. and ${criterion.condition} #{criterion.value}
  68. </when>
  69. <when test="criterion.betweenValue">
  70. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  71. </when>
  72. <when test="criterion.listValue">
  73. and ${criterion.condition}
  74. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  75. #{listItem}
  76. </foreach>
  77. </when>
  78. </choose>
  79. </foreach>
  80. </trim>
  81. </if>
  82. </foreach>
  83. </where>
  84. </sql>
  85. <sql id="Base_Column_List">
  86. <!--
  87. WARNING - @mbg.generated
  88. This element is automatically generated by MyBatis Generator, do not modify.
  89. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  90. -->
  91. id, equipment_no, packet_str, indate, is_use, threshold
  92. </sql>
  93. <select id="selectByExample" parameterType="com.js.kbt.model.MouldDownPacketExample" resultMap="BaseResultMap">
  94. <!--
  95. WARNING - @mbg.generated
  96. This element is automatically generated by MyBatis Generator, do not modify.
  97. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  98. -->
  99. select
  100. <if test="distinct">
  101. distinct
  102. </if>
  103. <include refid="Base_Column_List" />
  104. from mould_down_packet
  105. <if test="_parameter != null">
  106. <include refid="Example_Where_Clause" />
  107. </if>
  108. <if test="orderByClause != null">
  109. order by ${orderByClause}
  110. </if>
  111. </select>
  112. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  113. <!--
  114. WARNING - @mbg.generated
  115. This element is automatically generated by MyBatis Generator, do not modify.
  116. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  117. -->
  118. select
  119. <include refid="Base_Column_List" />
  120. from mould_down_packet
  121. where id = #{id,jdbcType=INTEGER}
  122. </select>
  123. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  124. <!--
  125. WARNING - @mbg.generated
  126. This element is automatically generated by MyBatis Generator, do not modify.
  127. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  128. -->
  129. delete from mould_down_packet
  130. where id = #{id,jdbcType=INTEGER}
  131. </delete>
  132. <delete id="deleteByExample" parameterType="com.js.kbt.model.MouldDownPacketExample">
  133. <!--
  134. WARNING - @mbg.generated
  135. This element is automatically generated by MyBatis Generator, do not modify.
  136. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  137. -->
  138. delete from mould_down_packet
  139. <if test="_parameter != null">
  140. <include refid="Example_Where_Clause" />
  141. </if>
  142. </delete>
  143. <insert id="insert" parameterType="com.js.kbt.model.MouldDownPacket">
  144. <!--
  145. WARNING - @mbg.generated
  146. This element is automatically generated by MyBatis Generator, do not modify.
  147. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  148. -->
  149. <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
  150. SELECT LAST_INSERT_ID()
  151. </selectKey>
  152. insert into mould_down_packet (equipment_no, packet_str, indate,
  153. is_use, threshold)
  154. values (#{equipmentNo,jdbcType=VARCHAR}, #{packetStr,jdbcType=VARCHAR}, #{indate,jdbcType=TIMESTAMP},
  155. #{isUse,jdbcType=INTEGER}, #{threshold,jdbcType=VARCHAR})
  156. </insert>
  157. <insert id="insertSelective" parameterType="com.js.kbt.model.MouldDownPacket">
  158. <!--
  159. WARNING - @mbg.generated
  160. This element is automatically generated by MyBatis Generator, do not modify.
  161. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  162. -->
  163. <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
  164. SELECT LAST_INSERT_ID()
  165. </selectKey>
  166. insert into mould_down_packet
  167. <trim prefix="(" suffix=")" suffixOverrides=",">
  168. <if test="equipmentNo != null">
  169. equipment_no,
  170. </if>
  171. <if test="packetStr != null">
  172. packet_str,
  173. </if>
  174. <if test="indate != null">
  175. indate,
  176. </if>
  177. <if test="isUse != null">
  178. is_use,
  179. </if>
  180. <if test="threshold != null">
  181. threshold,
  182. </if>
  183. </trim>
  184. <trim prefix="values (" suffix=")" suffixOverrides=",">
  185. <if test="equipmentNo != null">
  186. #{equipmentNo,jdbcType=VARCHAR},
  187. </if>
  188. <if test="packetStr != null">
  189. #{packetStr,jdbcType=VARCHAR},
  190. </if>
  191. <if test="indate != null">
  192. #{indate,jdbcType=TIMESTAMP},
  193. </if>
  194. <if test="isUse != null">
  195. #{isUse,jdbcType=INTEGER},
  196. </if>
  197. <if test="threshold != null">
  198. #{threshold,jdbcType=VARCHAR},
  199. </if>
  200. </trim>
  201. </insert>
  202. <select id="countByExample" parameterType="com.js.kbt.model.MouldDownPacketExample" resultType="java.lang.Long">
  203. <!--
  204. WARNING - @mbg.generated
  205. This element is automatically generated by MyBatis Generator, do not modify.
  206. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  207. -->
  208. select count(*) from mould_down_packet
  209. <if test="_parameter != null">
  210. <include refid="Example_Where_Clause" />
  211. </if>
  212. </select>
  213. <update id="updateByExampleSelective" parameterType="map">
  214. <!--
  215. WARNING - @mbg.generated
  216. This element is automatically generated by MyBatis Generator, do not modify.
  217. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  218. -->
  219. update mould_down_packet
  220. <set>
  221. <if test="record.id != null">
  222. id = #{record.id,jdbcType=INTEGER},
  223. </if>
  224. <if test="record.equipmentNo != null">
  225. equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
  226. </if>
  227. <if test="record.packetStr != null">
  228. packet_str = #{record.packetStr,jdbcType=VARCHAR},
  229. </if>
  230. <if test="record.indate != null">
  231. indate = #{record.indate,jdbcType=TIMESTAMP},
  232. </if>
  233. <if test="record.isUse != null">
  234. is_use = #{record.isUse,jdbcType=INTEGER},
  235. </if>
  236. <if test="record.threshold != null">
  237. threshold = #{record.threshold,jdbcType=VARCHAR},
  238. </if>
  239. </set>
  240. <if test="_parameter != null">
  241. <include refid="Update_By_Example_Where_Clause" />
  242. </if>
  243. </update>
  244. <update id="updateByExample" parameterType="map">
  245. <!--
  246. WARNING - @mbg.generated
  247. This element is automatically generated by MyBatis Generator, do not modify.
  248. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  249. -->
  250. update mould_down_packet
  251. set id = #{record.id,jdbcType=INTEGER},
  252. equipment_no = #{record.equipmentNo,jdbcType=VARCHAR},
  253. packet_str = #{record.packetStr,jdbcType=VARCHAR},
  254. indate = #{record.indate,jdbcType=TIMESTAMP},
  255. is_use = #{record.isUse,jdbcType=INTEGER},
  256. threshold = #{record.threshold,jdbcType=VARCHAR}
  257. <if test="_parameter != null">
  258. <include refid="Update_By_Example_Where_Clause" />
  259. </if>
  260. </update>
  261. <update id="updateByPrimaryKeySelective" parameterType="com.js.kbt.model.MouldDownPacket">
  262. <!--
  263. WARNING - @mbg.generated
  264. This element is automatically generated by MyBatis Generator, do not modify.
  265. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  266. -->
  267. update mould_down_packet
  268. <set>
  269. <if test="equipmentNo != null">
  270. equipment_no = #{equipmentNo,jdbcType=VARCHAR},
  271. </if>
  272. <if test="packetStr != null">
  273. packet_str = #{packetStr,jdbcType=VARCHAR},
  274. </if>
  275. <if test="indate != null">
  276. indate = #{indate,jdbcType=TIMESTAMP},
  277. </if>
  278. <if test="isUse != null">
  279. is_use = #{isUse,jdbcType=INTEGER},
  280. </if>
  281. <if test="threshold != null">
  282. threshold = #{threshold,jdbcType=VARCHAR},
  283. </if>
  284. </set>
  285. where id = #{id,jdbcType=INTEGER}
  286. </update>
  287. <update id="updateByPrimaryKey" parameterType="com.js.kbt.model.MouldDownPacket">
  288. <!--
  289. WARNING - @mbg.generated
  290. This element is automatically generated by MyBatis Generator, do not modify.
  291. This element was generated on Tue Oct 29 17:39:24 CST 2019.
  292. -->
  293. update mould_down_packet
  294. set equipment_no = #{equipmentNo,jdbcType=VARCHAR},
  295. packet_str = #{packetStr,jdbcType=VARCHAR},
  296. indate = #{indate,jdbcType=TIMESTAMP},
  297. is_use = #{isUse,jdbcType=INTEGER},
  298. threshold = #{threshold,jdbcType=VARCHAR}
  299. where id = #{id,jdbcType=INTEGER}
  300. </update>
  301. </mapper>