NewVideoCoverMapper.xml 17 KB

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