TTimingTaskHistoryMapper.xml 11 KB

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