DailyRecordEventsNewMapper.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  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.DailyRecordEventsNewMapper" >
  4. <resultMap id="BaseResultMap" type="cn.ourwill.module.house.entity.new_entity.DailyRecordEventsNew" >
  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.DailyRecordEventsNew" 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
  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
  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
  118. where id = #{id,jdbcType=INTEGER}
  119. </select>
  120. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  121. delete from daily_record_events_new
  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
  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.DailyRecordEventsNew" >
  131. insert into daily_record_events_new (id, house_id, grain_id,
  132. create_time, c_id, c_time,
  133. u_id, u_time, record
  134. )
  135. values (#{id,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.DailyRecordEventsNew" >
  141. insert into daily_record_events_new
  142. <trim prefix="(" suffix=")" suffixOverrides="," >
  143. <if test="id != null" >
  144. id,
  145. </if>
  146. <if test="houseId != null" >
  147. house_id,
  148. </if>
  149. <if test="grainId != null" >
  150. grain_id,
  151. </if>
  152. <if test="createTime != null" >
  153. create_time,
  154. </if>
  155. <if test="cId != null" >
  156. c_id,
  157. </if>
  158. <if test="cTime != null" >
  159. c_time,
  160. </if>
  161. <if test="uId != null" >
  162. u_id,
  163. </if>
  164. <if test="uTime != null" >
  165. u_time,
  166. </if>
  167. <if test="record != null" >
  168. record,
  169. </if>
  170. </trim>
  171. <trim prefix="values (" suffix=")" suffixOverrides="," >
  172. <if test="id != null" >
  173. #{id,jdbcType=INTEGER},
  174. </if>
  175. <if test="houseId != null" >
  176. #{houseId,jdbcType=INTEGER},
  177. </if>
  178. <if test="grainId != null" >
  179. #{grainId,jdbcType=INTEGER},
  180. </if>
  181. <if test="createTime != null" >
  182. #{createTime,jdbcType=VARCHAR},
  183. </if>
  184. <if test="cId != null" >
  185. #{cId,jdbcType=INTEGER},
  186. </if>
  187. <if test="cTime != null" >
  188. #{cTime,jdbcType=TIMESTAMP},
  189. </if>
  190. <if test="uId != null" >
  191. #{uId,jdbcType=INTEGER},
  192. </if>
  193. <if test="uTime != null" >
  194. #{uTime,jdbcType=TIMESTAMP},
  195. </if>
  196. <if test="record != null" >
  197. #{record,jdbcType=LONGVARCHAR},
  198. </if>
  199. </trim>
  200. </insert>
  201. <select id="countByExample" parameterType="cn.ourwill.module.house.entity.new_entity.DailyRecordEventsNewExample" resultType="java.lang.Integer" >
  202. select count(*) from daily_record_events_new
  203. <if test="_parameter != null" >
  204. <include refid="Example_Where_Clause" />
  205. </if>
  206. </select>
  207. <update id="updateByExampleSelective" parameterType="map" >
  208. update daily_record_events_new
  209. <set >
  210. <if test="record.id != null" >
  211. id = #{record.id,jdbcType=INTEGER},
  212. </if>
  213. <if test="record.houseId != null" >
  214. house_id = #{record.houseId,jdbcType=INTEGER},
  215. </if>
  216. <if test="record.grainId != null" >
  217. grain_id = #{record.grainId,jdbcType=INTEGER},
  218. </if>
  219. <if test="record.createTime != null" >
  220. create_time = #{record.createTime,jdbcType=VARCHAR},
  221. </if>
  222. <if test="record.cId != null" >
  223. c_id = #{record.cId,jdbcType=INTEGER},
  224. </if>
  225. <if test="record.cTime != null" >
  226. c_time = #{record.cTime,jdbcType=TIMESTAMP},
  227. </if>
  228. <if test="record.uId != null" >
  229. u_id = #{record.uId,jdbcType=INTEGER},
  230. </if>
  231. <if test="record.uTime != null" >
  232. u_time = #{record.uTime,jdbcType=TIMESTAMP},
  233. </if>
  234. <if test="record.record != null" >
  235. record = #{record.record,jdbcType=LONGVARCHAR},
  236. </if>
  237. </set>
  238. <if test="_parameter != null" >
  239. <include refid="Update_By_Example_Where_Clause" />
  240. </if>
  241. </update>
  242. <update id="updateByExampleWithBLOBs" parameterType="map" >
  243. update daily_record_events_new
  244. set id = #{record.id,jdbcType=INTEGER},
  245. house_id = #{record.houseId,jdbcType=INTEGER},
  246. grain_id = #{record.grainId,jdbcType=INTEGER},
  247. create_time = #{record.createTime,jdbcType=VARCHAR},
  248. c_id = #{record.cId,jdbcType=INTEGER},
  249. c_time = #{record.cTime,jdbcType=TIMESTAMP},
  250. u_id = #{record.uId,jdbcType=INTEGER},
  251. u_time = #{record.uTime,jdbcType=TIMESTAMP},
  252. record = #{record.record,jdbcType=LONGVARCHAR}
  253. <if test="_parameter != null" >
  254. <include refid="Update_By_Example_Where_Clause" />
  255. </if>
  256. </update>
  257. <update id="updateByExample" parameterType="map" >
  258. update daily_record_events_new
  259. set id = #{record.id,jdbcType=INTEGER},
  260. house_id = #{record.houseId,jdbcType=INTEGER},
  261. grain_id = #{record.grainId,jdbcType=INTEGER},
  262. create_time = #{record.createTime,jdbcType=VARCHAR},
  263. c_id = #{record.cId,jdbcType=INTEGER},
  264. c_time = #{record.cTime,jdbcType=TIMESTAMP},
  265. u_id = #{record.uId,jdbcType=INTEGER},
  266. u_time = #{record.uTime,jdbcType=TIMESTAMP}
  267. <if test="_parameter != null" >
  268. <include refid="Update_By_Example_Where_Clause" />
  269. </if>
  270. </update>
  271. <update id="updateByPrimaryKeySelective" parameterType="cn.ourwill.module.house.entity.new_entity.DailyRecordEventsNew" >
  272. update daily_record_events_new
  273. <set >
  274. <if test="houseId != null" >
  275. house_id = #{houseId,jdbcType=INTEGER},
  276. </if>
  277. <if test="grainId != null" >
  278. grain_id = #{grainId,jdbcType=INTEGER},
  279. </if>
  280. <if test="createTime != null" >
  281. create_time = #{createTime,jdbcType=VARCHAR},
  282. </if>
  283. <if test="cId != null" >
  284. c_id = #{cId,jdbcType=INTEGER},
  285. </if>
  286. <if test="cTime != null" >
  287. c_time = #{cTime,jdbcType=TIMESTAMP},
  288. </if>
  289. <if test="uId != null" >
  290. u_id = #{uId,jdbcType=INTEGER},
  291. </if>
  292. <if test="uTime != null" >
  293. u_time = #{uTime,jdbcType=TIMESTAMP},
  294. </if>
  295. <if test="record != null" >
  296. record = #{record,jdbcType=LONGVARCHAR},
  297. </if>
  298. </set>
  299. where id = #{id,jdbcType=INTEGER}
  300. </update>
  301. <update id="updateByPrimaryKeyWithBLOBs" parameterType="cn.ourwill.module.house.entity.new_entity.DailyRecordEventsNew" >
  302. update daily_record_events_new
  303. set house_id = #{houseId,jdbcType=INTEGER},
  304. grain_id = #{grainId,jdbcType=INTEGER},
  305. create_time = #{createTime,jdbcType=VARCHAR},
  306. c_id = #{cId,jdbcType=INTEGER},
  307. c_time = #{cTime,jdbcType=TIMESTAMP},
  308. u_id = #{uId,jdbcType=INTEGER},
  309. u_time = #{uTime,jdbcType=TIMESTAMP},
  310. record = #{record,jdbcType=LONGVARCHAR}
  311. where id = #{id,jdbcType=INTEGER}
  312. </update>
  313. <update id="updateByPrimaryKey" parameterType="cn.ourwill.module.house.entity.new_entity.DailyRecordEventsNew" >
  314. update daily_record_events_new
  315. set house_id = #{houseId,jdbcType=INTEGER},
  316. grain_id = #{grainId,jdbcType=INTEGER},
  317. create_time = #{createTime,jdbcType=VARCHAR},
  318. c_id = #{cId,jdbcType=INTEGER},
  319. c_time = #{cTime,jdbcType=TIMESTAMP},
  320. u_id = #{uId,jdbcType=INTEGER},
  321. u_time = #{uTime,jdbcType=TIMESTAMP}
  322. where id = #{id,jdbcType=INTEGER}
  323. </update>
  324. </mapper>