DailyRecordCheckNewMapper.xml 13 KB

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