DailyRecordConcentrationNewFileMapper.xml 15 KB

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