TaskReviewPushMapper.xml 11 KB

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