DailyRecordConcentrationNewMapper.xml 15 KB

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