DailyRecordEventsNewFileMapper.xml 12 KB

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