DmDeviceApplyNewMapper.xml 17 KB

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