MatchVideoMapper.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  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.tzld.piaoquan.longarticle.dao.mapper.longarticle.MatchVideoMapper">
  4. <resultMap id="BaseResultMap" type="com.tzld.piaoquan.longarticle.model.po.longarticle.MatchVideo">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="trace_id" jdbcType="VARCHAR" property="traceId" />
  7. <result column="content_id" jdbcType="VARCHAR" property="contentId" />
  8. <result column="flow_pool_level" jdbcType="VARCHAR" property="flowPoolLevel" />
  9. <result column="gh_id" jdbcType="VARCHAR" property="ghId" />
  10. <result column="account_name" jdbcType="VARCHAR" property="accountName" />
  11. <result column="video_pool_trace_id" jdbcType="VARCHAR" property="videoPoolTraceId" />
  12. <result column="content_status" jdbcType="INTEGER" property="contentStatus" />
  13. <result column="content_status_update_time" jdbcType="INTEGER" property="contentStatusUpdateTime" />
  14. <result column="success_status" jdbcType="INTEGER" property="successStatus" />
  15. <result column="request_timestamp" jdbcType="INTEGER" property="requestTimestamp" />
  16. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  17. <result column="process_times" jdbcType="INTEGER" property="processTimes" />
  18. <result column="publish_flag" jdbcType="INTEGER" property="publishFlag" />
  19. </resultMap>
  20. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tzld.piaoquan.longarticle.model.po.longarticle.MatchVideo">
  21. <result column="response" jdbcType="LONGVARCHAR" property="response" />
  22. </resultMap>
  23. <sql id="Example_Where_Clause">
  24. <where>
  25. <foreach collection="oredCriteria" item="criteria" separator="or">
  26. <if test="criteria.valid">
  27. <trim prefix="(" prefixOverrides="and" suffix=")">
  28. <foreach collection="criteria.criteria" item="criterion">
  29. <choose>
  30. <when test="criterion.noValue">
  31. and ${criterion.condition}
  32. </when>
  33. <when test="criterion.singleValue">
  34. and ${criterion.condition} #{criterion.value}
  35. </when>
  36. <when test="criterion.betweenValue">
  37. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  38. </when>
  39. <when test="criterion.listValue">
  40. and ${criterion.condition}
  41. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  42. #{listItem}
  43. </foreach>
  44. </when>
  45. </choose>
  46. </foreach>
  47. </trim>
  48. </if>
  49. </foreach>
  50. </where>
  51. </sql>
  52. <sql id="Update_By_Example_Where_Clause">
  53. <where>
  54. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  55. <if test="criteria.valid">
  56. <trim prefix="(" prefixOverrides="and" suffix=")">
  57. <foreach collection="criteria.criteria" item="criterion">
  58. <choose>
  59. <when test="criterion.noValue">
  60. and ${criterion.condition}
  61. </when>
  62. <when test="criterion.singleValue">
  63. and ${criterion.condition} #{criterion.value}
  64. </when>
  65. <when test="criterion.betweenValue">
  66. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  67. </when>
  68. <when test="criterion.listValue">
  69. and ${criterion.condition}
  70. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  71. #{listItem}
  72. </foreach>
  73. </when>
  74. </choose>
  75. </foreach>
  76. </trim>
  77. </if>
  78. </foreach>
  79. </where>
  80. </sql>
  81. <sql id="Base_Column_List">
  82. id, trace_id, content_id, flow_pool_level, gh_id, account_name, video_pool_trace_id,
  83. content_status, content_status_update_time, success_status, request_timestamp, update_time,
  84. process_times, publish_flag
  85. </sql>
  86. <sql id="Blob_Column_List">
  87. response
  88. </sql>
  89. <select id="selectByExampleWithBLOBs" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.MatchVideoExample" resultMap="ResultMapWithBLOBs">
  90. select
  91. <if test="distinct">
  92. distinct
  93. </if>
  94. <include refid="Base_Column_List" />
  95. ,
  96. <include refid="Blob_Column_List" />
  97. from long_articles_match_videos
  98. <if test="_parameter != null">
  99. <include refid="Example_Where_Clause" />
  100. </if>
  101. <if test="orderByClause != null">
  102. order by ${orderByClause}
  103. </if>
  104. <if test="page != null">
  105. limit #{page.offset} , #{page.pageSize}
  106. </if>
  107. </select>
  108. <select id="selectByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.MatchVideoExample" resultMap="BaseResultMap">
  109. select
  110. <if test="distinct">
  111. distinct
  112. </if>
  113. <include refid="Base_Column_List" />
  114. from long_articles_match_videos
  115. <if test="_parameter != null">
  116. <include refid="Example_Where_Clause" />
  117. </if>
  118. <if test="orderByClause != null">
  119. order by ${orderByClause}
  120. </if>
  121. <if test="page != null">
  122. limit #{page.offset} , #{page.pageSize}
  123. </if>
  124. </select>
  125. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
  126. select
  127. <include refid="Base_Column_List" />
  128. ,
  129. <include refid="Blob_Column_List" />
  130. from long_articles_match_videos
  131. where id = #{id,jdbcType=INTEGER}
  132. </select>
  133. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  134. delete from long_articles_match_videos
  135. where id = #{id,jdbcType=INTEGER}
  136. </delete>
  137. <delete id="deleteByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.MatchVideoExample">
  138. delete from long_articles_match_videos
  139. <if test="_parameter != null">
  140. <include refid="Example_Where_Clause" />
  141. </if>
  142. </delete>
  143. <insert id="insert" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.MatchVideo">
  144. insert into long_articles_match_videos (id, trace_id, content_id,
  145. flow_pool_level, gh_id, account_name,
  146. video_pool_trace_id, content_status, content_status_update_time,
  147. success_status, request_timestamp, update_time,
  148. process_times, publish_flag, response
  149. )
  150. values (#{id,jdbcType=INTEGER}, #{traceId,jdbcType=VARCHAR}, #{contentId,jdbcType=VARCHAR},
  151. #{flowPoolLevel,jdbcType=VARCHAR}, #{ghId,jdbcType=VARCHAR}, #{accountName,jdbcType=VARCHAR},
  152. #{videoPoolTraceId,jdbcType=VARCHAR}, #{contentStatus,jdbcType=INTEGER}, #{contentStatusUpdateTime,jdbcType=INTEGER},
  153. #{successStatus,jdbcType=INTEGER}, #{requestTimestamp,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP},
  154. #{processTimes,jdbcType=INTEGER}, #{publishFlag,jdbcType=INTEGER}, #{response,jdbcType=LONGVARCHAR}
  155. )
  156. </insert>
  157. <insert id="insertSelective" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.MatchVideo" useGeneratedKeys="true" keyProperty="id">
  158. insert into long_articles_match_videos
  159. <trim prefix="(" suffix=")" suffixOverrides=",">
  160. <if test="id != null">
  161. id,
  162. </if>
  163. <if test="traceId != null">
  164. trace_id,
  165. </if>
  166. <if test="contentId != null">
  167. content_id,
  168. </if>
  169. <if test="flowPoolLevel != null">
  170. flow_pool_level,
  171. </if>
  172. <if test="ghId != null">
  173. gh_id,
  174. </if>
  175. <if test="accountName != null">
  176. account_name,
  177. </if>
  178. <if test="videoPoolTraceId != null">
  179. video_pool_trace_id,
  180. </if>
  181. <if test="contentStatus != null">
  182. content_status,
  183. </if>
  184. <if test="contentStatusUpdateTime != null">
  185. content_status_update_time,
  186. </if>
  187. <if test="successStatus != null">
  188. success_status,
  189. </if>
  190. <if test="requestTimestamp != null">
  191. request_timestamp,
  192. </if>
  193. <if test="updateTime != null">
  194. update_time,
  195. </if>
  196. <if test="processTimes != null">
  197. process_times,
  198. </if>
  199. <if test="publishFlag != null">
  200. publish_flag,
  201. </if>
  202. <if test="response != null">
  203. response,
  204. </if>
  205. </trim>
  206. <trim prefix="values (" suffix=")" suffixOverrides=",">
  207. <if test="id != null">
  208. #{id,jdbcType=INTEGER},
  209. </if>
  210. <if test="traceId != null">
  211. #{traceId,jdbcType=VARCHAR},
  212. </if>
  213. <if test="contentId != null">
  214. #{contentId,jdbcType=VARCHAR},
  215. </if>
  216. <if test="flowPoolLevel != null">
  217. #{flowPoolLevel,jdbcType=VARCHAR},
  218. </if>
  219. <if test="ghId != null">
  220. #{ghId,jdbcType=VARCHAR},
  221. </if>
  222. <if test="accountName != null">
  223. #{accountName,jdbcType=VARCHAR},
  224. </if>
  225. <if test="videoPoolTraceId != null">
  226. #{videoPoolTraceId,jdbcType=VARCHAR},
  227. </if>
  228. <if test="contentStatus != null">
  229. #{contentStatus,jdbcType=INTEGER},
  230. </if>
  231. <if test="contentStatusUpdateTime != null">
  232. #{contentStatusUpdateTime,jdbcType=INTEGER},
  233. </if>
  234. <if test="successStatus != null">
  235. #{successStatus,jdbcType=INTEGER},
  236. </if>
  237. <if test="requestTimestamp != null">
  238. #{requestTimestamp,jdbcType=INTEGER},
  239. </if>
  240. <if test="updateTime != null">
  241. #{updateTime,jdbcType=TIMESTAMP},
  242. </if>
  243. <if test="processTimes != null">
  244. #{processTimes,jdbcType=INTEGER},
  245. </if>
  246. <if test="publishFlag != null">
  247. #{publishFlag,jdbcType=INTEGER},
  248. </if>
  249. <if test="response != null">
  250. #{response,jdbcType=LONGVARCHAR},
  251. </if>
  252. </trim>
  253. <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id">
  254. select LAST_INSERT_ID()
  255. </selectKey>
  256. </insert>
  257. <select id="countByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.MatchVideoExample" resultType="java.lang.Long">
  258. select count(*) from long_articles_match_videos
  259. <if test="_parameter != null">
  260. <include refid="Example_Where_Clause" />
  261. </if>
  262. </select>
  263. <update id="updateByExampleSelective" parameterType="map">
  264. update long_articles_match_videos
  265. <set>
  266. <if test="record.id != null">
  267. id = #{record.id,jdbcType=INTEGER},
  268. </if>
  269. <if test="record.traceId != null">
  270. trace_id = #{record.traceId,jdbcType=VARCHAR},
  271. </if>
  272. <if test="record.contentId != null">
  273. content_id = #{record.contentId,jdbcType=VARCHAR},
  274. </if>
  275. <if test="record.flowPoolLevel != null">
  276. flow_pool_level = #{record.flowPoolLevel,jdbcType=VARCHAR},
  277. </if>
  278. <if test="record.ghId != null">
  279. gh_id = #{record.ghId,jdbcType=VARCHAR},
  280. </if>
  281. <if test="record.accountName != null">
  282. account_name = #{record.accountName,jdbcType=VARCHAR},
  283. </if>
  284. <if test="record.videoPoolTraceId != null">
  285. video_pool_trace_id = #{record.videoPoolTraceId,jdbcType=VARCHAR},
  286. </if>
  287. <if test="record.contentStatus != null">
  288. content_status = #{record.contentStatus,jdbcType=INTEGER},
  289. </if>
  290. <if test="record.contentStatusUpdateTime != null">
  291. content_status_update_time = #{record.contentStatusUpdateTime,jdbcType=INTEGER},
  292. </if>
  293. <if test="record.successStatus != null">
  294. success_status = #{record.successStatus,jdbcType=INTEGER},
  295. </if>
  296. <if test="record.requestTimestamp != null">
  297. request_timestamp = #{record.requestTimestamp,jdbcType=INTEGER},
  298. </if>
  299. <if test="record.updateTime != null">
  300. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  301. </if>
  302. <if test="record.processTimes != null">
  303. process_times = #{record.processTimes,jdbcType=INTEGER},
  304. </if>
  305. <if test="record.publishFlag != null">
  306. publish_flag = #{record.publishFlag,jdbcType=INTEGER},
  307. </if>
  308. <if test="record.response != null">
  309. response = #{record.response,jdbcType=LONGVARCHAR},
  310. </if>
  311. </set>
  312. <if test="_parameter != null">
  313. <include refid="Update_By_Example_Where_Clause" />
  314. </if>
  315. </update>
  316. <update id="updateByExampleWithBLOBs" parameterType="map">
  317. update long_articles_match_videos
  318. set id = #{record.id,jdbcType=INTEGER},
  319. trace_id = #{record.traceId,jdbcType=VARCHAR},
  320. content_id = #{record.contentId,jdbcType=VARCHAR},
  321. flow_pool_level = #{record.flowPoolLevel,jdbcType=VARCHAR},
  322. gh_id = #{record.ghId,jdbcType=VARCHAR},
  323. account_name = #{record.accountName,jdbcType=VARCHAR},
  324. video_pool_trace_id = #{record.videoPoolTraceId,jdbcType=VARCHAR},
  325. content_status = #{record.contentStatus,jdbcType=INTEGER},
  326. content_status_update_time = #{record.contentStatusUpdateTime,jdbcType=INTEGER},
  327. success_status = #{record.successStatus,jdbcType=INTEGER},
  328. request_timestamp = #{record.requestTimestamp,jdbcType=INTEGER},
  329. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  330. process_times = #{record.processTimes,jdbcType=INTEGER},
  331. publish_flag = #{record.publishFlag,jdbcType=INTEGER},
  332. response = #{record.response,jdbcType=LONGVARCHAR}
  333. <if test="_parameter != null">
  334. <include refid="Update_By_Example_Where_Clause" />
  335. </if>
  336. </update>
  337. <update id="updateByExample" parameterType="map">
  338. update long_articles_match_videos
  339. set id = #{record.id,jdbcType=INTEGER},
  340. trace_id = #{record.traceId,jdbcType=VARCHAR},
  341. content_id = #{record.contentId,jdbcType=VARCHAR},
  342. flow_pool_level = #{record.flowPoolLevel,jdbcType=VARCHAR},
  343. gh_id = #{record.ghId,jdbcType=VARCHAR},
  344. account_name = #{record.accountName,jdbcType=VARCHAR},
  345. video_pool_trace_id = #{record.videoPoolTraceId,jdbcType=VARCHAR},
  346. content_status = #{record.contentStatus,jdbcType=INTEGER},
  347. content_status_update_time = #{record.contentStatusUpdateTime,jdbcType=INTEGER},
  348. success_status = #{record.successStatus,jdbcType=INTEGER},
  349. request_timestamp = #{record.requestTimestamp,jdbcType=INTEGER},
  350. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  351. process_times = #{record.processTimes,jdbcType=INTEGER},
  352. publish_flag = #{record.publishFlag,jdbcType=INTEGER}
  353. <if test="_parameter != null">
  354. <include refid="Update_By_Example_Where_Clause" />
  355. </if>
  356. </update>
  357. <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.MatchVideo">
  358. update long_articles_match_videos
  359. <set>
  360. <if test="traceId != null">
  361. trace_id = #{traceId,jdbcType=VARCHAR},
  362. </if>
  363. <if test="contentId != null">
  364. content_id = #{contentId,jdbcType=VARCHAR},
  365. </if>
  366. <if test="flowPoolLevel != null">
  367. flow_pool_level = #{flowPoolLevel,jdbcType=VARCHAR},
  368. </if>
  369. <if test="ghId != null">
  370. gh_id = #{ghId,jdbcType=VARCHAR},
  371. </if>
  372. <if test="accountName != null">
  373. account_name = #{accountName,jdbcType=VARCHAR},
  374. </if>
  375. <if test="videoPoolTraceId != null">
  376. video_pool_trace_id = #{videoPoolTraceId,jdbcType=VARCHAR},
  377. </if>
  378. <if test="contentStatus != null">
  379. content_status = #{contentStatus,jdbcType=INTEGER},
  380. </if>
  381. <if test="contentStatusUpdateTime != null">
  382. content_status_update_time = #{contentStatusUpdateTime,jdbcType=INTEGER},
  383. </if>
  384. <if test="successStatus != null">
  385. success_status = #{successStatus,jdbcType=INTEGER},
  386. </if>
  387. <if test="requestTimestamp != null">
  388. request_timestamp = #{requestTimestamp,jdbcType=INTEGER},
  389. </if>
  390. <if test="updateTime != null">
  391. update_time = #{updateTime,jdbcType=TIMESTAMP},
  392. </if>
  393. <if test="processTimes != null">
  394. process_times = #{processTimes,jdbcType=INTEGER},
  395. </if>
  396. <if test="publishFlag != null">
  397. publish_flag = #{publishFlag,jdbcType=INTEGER},
  398. </if>
  399. <if test="response != null">
  400. response = #{response,jdbcType=LONGVARCHAR},
  401. </if>
  402. </set>
  403. where id = #{id,jdbcType=INTEGER}
  404. </update>
  405. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.MatchVideo">
  406. update long_articles_match_videos
  407. set trace_id = #{traceId,jdbcType=VARCHAR},
  408. content_id = #{contentId,jdbcType=VARCHAR},
  409. flow_pool_level = #{flowPoolLevel,jdbcType=VARCHAR},
  410. gh_id = #{ghId,jdbcType=VARCHAR},
  411. account_name = #{accountName,jdbcType=VARCHAR},
  412. video_pool_trace_id = #{videoPoolTraceId,jdbcType=VARCHAR},
  413. content_status = #{contentStatus,jdbcType=INTEGER},
  414. content_status_update_time = #{contentStatusUpdateTime,jdbcType=INTEGER},
  415. success_status = #{successStatus,jdbcType=INTEGER},
  416. request_timestamp = #{requestTimestamp,jdbcType=INTEGER},
  417. update_time = #{updateTime,jdbcType=TIMESTAMP},
  418. process_times = #{processTimes,jdbcType=INTEGER},
  419. publish_flag = #{publishFlag,jdbcType=INTEGER},
  420. response = #{response,jdbcType=LONGVARCHAR}
  421. where id = #{id,jdbcType=INTEGER}
  422. </update>
  423. <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.MatchVideo">
  424. update long_articles_match_videos
  425. set trace_id = #{traceId,jdbcType=VARCHAR},
  426. content_id = #{contentId,jdbcType=VARCHAR},
  427. flow_pool_level = #{flowPoolLevel,jdbcType=VARCHAR},
  428. gh_id = #{ghId,jdbcType=VARCHAR},
  429. account_name = #{accountName,jdbcType=VARCHAR},
  430. video_pool_trace_id = #{videoPoolTraceId,jdbcType=VARCHAR},
  431. content_status = #{contentStatus,jdbcType=INTEGER},
  432. content_status_update_time = #{contentStatusUpdateTime,jdbcType=INTEGER},
  433. success_status = #{successStatus,jdbcType=INTEGER},
  434. request_timestamp = #{requestTimestamp,jdbcType=INTEGER},
  435. update_time = #{updateTime,jdbcType=TIMESTAMP},
  436. process_times = #{processTimes,jdbcType=INTEGER},
  437. publish_flag = #{publishFlag,jdbcType=INTEGER}
  438. where id = #{id,jdbcType=INTEGER}
  439. </update>
  440. </mapper>