DmDeviceInoutNewMapper.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  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="cn.ourwill.module.house.entity.new_entity.DmDeviceInoutNewMapper" >
  4. <resultMap id="BaseResultMap" type="cn.ourwill.module.house.entity.new_entity.DmDeviceInoutNew" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="create_time" property="createTime" jdbcType="VARCHAR" />
  7. <result column="name" property="name" jdbcType="VARCHAR" />
  8. <result column="model" property="model" jdbcType="VARCHAR" />
  9. <result column="remark" property="remark" jdbcType="VARCHAR" />
  10. <result column="in_number" property="inNumber" jdbcType="INTEGER" />
  11. <result column="out_number" property="outNumber" jdbcType="INTEGER" />
  12. <result column="surplus" property="surplus" jdbcType="INTEGER" />
  13. <result column="book_user" property="bookUser" jdbcType="VARCHAR" />
  14. <result column="brokerage" property="brokerage" jdbcType="VARCHAR" />
  15. <result column="check_user" property="checkUser" jdbcType="VARCHAR" />
  16. <result column="inout_id" property="inoutId" jdbcType="INTEGER" />
  17. <result column="uuid" property="uuid" jdbcType="VARCHAR" />
  18. <result column="c_id" property="cId" jdbcType="INTEGER" />
  19. <result column="c_time" property="cTime" jdbcType="TIMESTAMP" />
  20. <result column="u_id" property="uId" jdbcType="INTEGER" />
  21. <result column="u_time" property="uTime" jdbcType="TIMESTAMP" />
  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, create_time, name, model, remark, in_number, out_number, surplus, book_user,
  83. brokerage, check_user, inout_id, c_id, c_time, u_id, u_time
  84. </sql>
  85. <select id="selectByExample" resultMap="BaseResultMap" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceInoutNewExample" >
  86. select
  87. <if test="distinct" >
  88. distinct
  89. </if>
  90. <include refid="Base_Column_List" />
  91. from dm_device_inout_new
  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.Integer" >
  100. select
  101. <include refid="Base_Column_List" />
  102. from dm_device_inout_new
  103. where id = #{id,jdbcType=INTEGER}
  104. </select>
  105. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  106. delete from dm_device_inout_new
  107. where id = #{id,jdbcType=INTEGER}
  108. </delete>
  109. <delete id="deleteByExample" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceInoutNewExample" >
  110. delete from dm_device_inout_new
  111. <if test="_parameter != null" >
  112. <include refid="Example_Where_Clause" />
  113. </if>
  114. </delete>
  115. <insert id="insert" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceInoutNew" >
  116. insert into dm_device_inout_new (id, create_time, name,
  117. model, remark, in_number,
  118. out_number, surplus, book_user,
  119. brokerage, check_user, inout_id,
  120. c_id, c_time, u_id,
  121. u_time)
  122. values (#{id,jdbcType=INTEGER}, #{createTime,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
  123. #{model,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{inNumber,jdbcType=INTEGER},
  124. #{outNumber,jdbcType=INTEGER}, #{surplus,jdbcType=INTEGER}, #{bookUser,jdbcType=VARCHAR},
  125. #{brokerage,jdbcType=VARCHAR}, #{checkUser,jdbcType=VARCHAR}, #{inoutId,jdbcType=INTEGER},
  126. #{cId,jdbcType=INTEGER}, #{cTime,jdbcType=TIMESTAMP}, #{uId,jdbcType=INTEGER},
  127. #{uTime,jdbcType=TIMESTAMP})
  128. </insert>
  129. <insert id="insertSelective" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceInoutNew" >
  130. insert into dm_device_inout_new
  131. <trim prefix="(" suffix=")" suffixOverrides="," >
  132. <if test="id != null" >
  133. id,
  134. </if>
  135. <if test="createTime != null" >
  136. create_time,
  137. </if>
  138. <if test="name != null" >
  139. name,
  140. </if>
  141. <if test="model != null" >
  142. model,
  143. </if>
  144. <if test="remark != null" >
  145. remark,
  146. </if>
  147. <if test="inNumber != null" >
  148. in_number,
  149. </if>
  150. <if test="outNumber != null" >
  151. out_number,
  152. </if>
  153. <if test="surplus != null" >
  154. surplus,
  155. </if>
  156. <if test="bookUser != null" >
  157. book_user,
  158. </if>
  159. <if test="brokerage != null" >
  160. brokerage,
  161. </if>
  162. <if test="checkUser != null" >
  163. check_user,
  164. </if>
  165. <if test="inoutId != null" >
  166. inout_id,
  167. </if>
  168. <if test="cId != null" >
  169. c_id,
  170. </if>
  171. <if test="cTime != null" >
  172. c_time,
  173. </if>
  174. <if test="uId != null" >
  175. u_id,
  176. </if>
  177. <if test="uTime != null" >
  178. u_time,
  179. </if>
  180. </trim>
  181. <trim prefix="values (" suffix=")" suffixOverrides="," >
  182. <if test="id != null" >
  183. #{id,jdbcType=INTEGER},
  184. </if>
  185. <if test="createTime != null" >
  186. #{createTime,jdbcType=VARCHAR},
  187. </if>
  188. <if test="name != null" >
  189. #{name,jdbcType=VARCHAR},
  190. </if>
  191. <if test="model != null" >
  192. #{model,jdbcType=VARCHAR},
  193. </if>
  194. <if test="remark != null" >
  195. #{remark,jdbcType=VARCHAR},
  196. </if>
  197. <if test="inNumber != null" >
  198. #{inNumber,jdbcType=INTEGER},
  199. </if>
  200. <if test="outNumber != null" >
  201. #{outNumber,jdbcType=INTEGER},
  202. </if>
  203. <if test="surplus != null" >
  204. #{surplus,jdbcType=INTEGER},
  205. </if>
  206. <if test="bookUser != null" >
  207. #{bookUser,jdbcType=VARCHAR},
  208. </if>
  209. <if test="brokerage != null" >
  210. #{brokerage,jdbcType=VARCHAR},
  211. </if>
  212. <if test="checkUser != null" >
  213. #{checkUser,jdbcType=VARCHAR},
  214. </if>
  215. <if test="inoutId != null" >
  216. #{inoutId,jdbcType=INTEGER},
  217. </if>
  218. <if test="cId != null" >
  219. #{cId,jdbcType=INTEGER},
  220. </if>
  221. <if test="cTime != null" >
  222. #{cTime,jdbcType=TIMESTAMP},
  223. </if>
  224. <if test="uId != null" >
  225. #{uId,jdbcType=INTEGER},
  226. </if>
  227. <if test="uTime != null" >
  228. #{uTime,jdbcType=TIMESTAMP},
  229. </if>
  230. </trim>
  231. </insert>
  232. <select id="countByExample" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceInoutNewExample" resultType="java.lang.Integer" >
  233. select count(*) from dm_device_inout_new
  234. <if test="_parameter != null" >
  235. <include refid="Example_Where_Clause" />
  236. </if>
  237. </select>
  238. <update id="updateByExampleSelective" parameterType="map" >
  239. update dm_device_inout_new
  240. <set >
  241. <if test="record.id != null" >
  242. id = #{record.id,jdbcType=INTEGER},
  243. </if>
  244. <if test="record.createTime != null" >
  245. create_time = #{record.createTime,jdbcType=VARCHAR},
  246. </if>
  247. <if test="record.name != null" >
  248. name = #{record.name,jdbcType=VARCHAR},
  249. </if>
  250. <if test="record.model != null" >
  251. model = #{record.model,jdbcType=VARCHAR},
  252. </if>
  253. <if test="record.remark != null" >
  254. remark = #{record.remark,jdbcType=VARCHAR},
  255. </if>
  256. <if test="record.inNumber != null" >
  257. in_number = #{record.inNumber,jdbcType=INTEGER},
  258. </if>
  259. <if test="record.outNumber != null" >
  260. out_number = #{record.outNumber,jdbcType=INTEGER},
  261. </if>
  262. <if test="record.surplus != null" >
  263. surplus = #{record.surplus,jdbcType=INTEGER},
  264. </if>
  265. <if test="record.bookUser != null" >
  266. book_user = #{record.bookUser,jdbcType=VARCHAR},
  267. </if>
  268. <if test="record.brokerage != null" >
  269. brokerage = #{record.brokerage,jdbcType=VARCHAR},
  270. </if>
  271. <if test="record.checkUser != null" >
  272. check_user = #{record.checkUser,jdbcType=VARCHAR},
  273. </if>
  274. <if test="record.inoutId != null" >
  275. inout_id = #{record.inoutId,jdbcType=INTEGER},
  276. </if>
  277. <if test="record.cId != null" >
  278. c_id = #{record.cId,jdbcType=INTEGER},
  279. </if>
  280. <if test="record.cTime != null" >
  281. c_time = #{record.cTime,jdbcType=TIMESTAMP},
  282. </if>
  283. <if test="record.uId != null" >
  284. u_id = #{record.uId,jdbcType=INTEGER},
  285. </if>
  286. <if test="record.uTime != null" >
  287. u_time = #{record.uTime,jdbcType=TIMESTAMP},
  288. </if>
  289. </set>
  290. <if test="_parameter != null" >
  291. <include refid="Update_By_Example_Where_Clause" />
  292. </if>
  293. </update>
  294. <update id="updateByExample" parameterType="map" >
  295. update dm_device_inout_new
  296. set id = #{record.id,jdbcType=INTEGER},
  297. create_time = #{record.createTime,jdbcType=VARCHAR},
  298. name = #{record.name,jdbcType=VARCHAR},
  299. model = #{record.model,jdbcType=VARCHAR},
  300. remark = #{record.remark,jdbcType=VARCHAR},
  301. in_number = #{record.inNumber,jdbcType=INTEGER},
  302. out_number = #{record.outNumber,jdbcType=INTEGER},
  303. surplus = #{record.surplus,jdbcType=INTEGER},
  304. book_user = #{record.bookUser,jdbcType=VARCHAR},
  305. brokerage = #{record.brokerage,jdbcType=VARCHAR},
  306. check_user = #{record.checkUser,jdbcType=VARCHAR},
  307. inout_id = #{record.inoutId,jdbcType=INTEGER},
  308. c_id = #{record.cId,jdbcType=INTEGER},
  309. c_time = #{record.cTime,jdbcType=TIMESTAMP},
  310. u_id = #{record.uId,jdbcType=INTEGER},
  311. u_time = #{record.uTime,jdbcType=TIMESTAMP}
  312. <if test="_parameter != null" >
  313. <include refid="Update_By_Example_Where_Clause" />
  314. </if>
  315. </update>
  316. <update id="updateByPrimaryKeySelective" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceInoutNew" >
  317. update dm_device_inout_new
  318. <set >
  319. <if test="createTime != null" >
  320. create_time = #{createTime,jdbcType=VARCHAR},
  321. </if>
  322. <if test="name != null" >
  323. name = #{name,jdbcType=VARCHAR},
  324. </if>
  325. <if test="model != null" >
  326. model = #{model,jdbcType=VARCHAR},
  327. </if>
  328. <if test="remark != null" >
  329. remark = #{remark,jdbcType=VARCHAR},
  330. </if>
  331. <if test="inNumber != null" >
  332. in_number = #{inNumber,jdbcType=INTEGER},
  333. </if>
  334. <if test="outNumber != null" >
  335. out_number = #{outNumber,jdbcType=INTEGER},
  336. </if>
  337. <if test="surplus != null" >
  338. surplus = #{surplus,jdbcType=INTEGER},
  339. </if>
  340. <if test="bookUser != null" >
  341. book_user = #{bookUser,jdbcType=VARCHAR},
  342. </if>
  343. <if test="brokerage != null" >
  344. brokerage = #{brokerage,jdbcType=VARCHAR},
  345. </if>
  346. <if test="checkUser != null" >
  347. check_user = #{checkUser,jdbcType=VARCHAR},
  348. </if>
  349. <if test="inoutId != null" >
  350. inout_id = #{inoutId,jdbcType=INTEGER},
  351. </if>
  352. <if test="cId != null" >
  353. c_id = #{cId,jdbcType=INTEGER},
  354. </if>
  355. <if test="cTime != null" >
  356. c_time = #{cTime,jdbcType=TIMESTAMP},
  357. </if>
  358. <if test="uId != null" >
  359. u_id = #{uId,jdbcType=INTEGER},
  360. </if>
  361. <if test="uTime != null" >
  362. u_time = #{uTime,jdbcType=TIMESTAMP},
  363. </if>
  364. </set>
  365. where id = #{id,jdbcType=INTEGER}
  366. </update>
  367. <update id="updateByPrimaryKey" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceInoutNew" >
  368. update dm_device_inout_new
  369. set create_time = #{createTime,jdbcType=VARCHAR},
  370. name = #{name,jdbcType=VARCHAR},
  371. model = #{model,jdbcType=VARCHAR},
  372. remark = #{remark,jdbcType=VARCHAR},
  373. in_number = #{inNumber,jdbcType=INTEGER},
  374. out_number = #{outNumber,jdbcType=INTEGER},
  375. surplus = #{surplus,jdbcType=INTEGER},
  376. book_user = #{bookUser,jdbcType=VARCHAR},
  377. brokerage = #{brokerage,jdbcType=VARCHAR},
  378. check_user = #{checkUser,jdbcType=VARCHAR},
  379. inout_id = #{inoutId,jdbcType=INTEGER},
  380. c_id = #{cId,jdbcType=INTEGER},
  381. c_time = #{cTime,jdbcType=TIMESTAMP},
  382. u_id = #{uId,jdbcType=INTEGER},
  383. u_time = #{uTime,jdbcType=TIMESTAMP}
  384. where id = #{id,jdbcType=INTEGER}
  385. </update>
  386. </mapper>