123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.tzld.longarticle.recommend.server.mapper.longArticle.VideoPoolAuditMapper">
- <select id="articleVideoAuditListCount" resultType="java.lang.Integer">
- select count(content_trace_id)
- from publish_single_video_source
- where bad_status in (0, 5) and audit_status = 1
- <if test="status!= null and status.size() > 0">
- and video_pool_audit_status in
- <foreach collection="status" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="contentId!= null and contentId.size() > 0">
- and content_trace_id in
- <foreach collection="contentId" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="title!= null and title.size() > 0">
- and article_title in
- <foreach collection="title" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="auditAccount!= null and auditAccount.size() > 0">
- and video_pool_audit_account in
- <foreach collection="auditAccount" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="flowPoolLevels!= null and flowPoolLevels.size() > 0">
- and flow_pool_level in
- <foreach collection="flowPoolLevels" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- </select>
- <select id="articleVideoAuditList"
- resultType="com.tzld.longarticle.recommend.server.model.entity.longArticle.PublishSingleVideoSource">
- select *
- from publish_single_video_source
- where bad_status in (0, 5) and audit_status = 1
- <if test="status!= null and status.size() > 0">
- and `video_pool_audit_status` in
- <foreach collection="status" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="contentId!= null and contentId.size() > 0">
- and content_trace_id in
- <foreach collection="contentId" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="title!= null and title.size() > 0">
- and article_title in
- <foreach collection="title" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="auditAccount!= null and auditAccount.size() > 0">
- and video_pool_audit_account in
- <foreach collection="auditAccount" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="flowPoolLevels!= null and flowPoolLevels.size() > 0">
- and flow_pool_level in
- <foreach collection="flowPoolLevels" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <choose>
- <when test="poolLevelDesc != null and poolLevelDesc != ''">
- order by flow_pool_level ${poolLevelDesc}, content_trace_id desc
- </when>
- <otherwise>
- order by content_trace_id desc
- </otherwise>
- </choose>
- limit #{offset}, #{pageSize}
- </select>
- <select id="articleVideoAuditNext"
- resultType="com.tzld.longarticle.recommend.server.model.entity.longArticle.PublishSingleVideoSource">
- select *
- from publish_single_video_source
- where bad_status = 0 and audit_status = 1
- <if test="status!= null and status.size() > 0">
- and `video_pool_audit_status` in
- <foreach collection="status" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="contentId!= null and contentId.size() > 0">
- and content_trace_id in
- <foreach collection="contentId" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="title!= null and title.size() > 0">
- and article_title in
- <foreach collection="title" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="auditAccount!= null and auditAccount.size() > 0">
- and video_pool_audit_account in
- <foreach collection="auditAccount" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="flowPoolLevel != null">
- and flow_pool_level = #{flowPoolLevel}
- </if>
- order by content_trace_id desc
- limit 1
- </select>
- <select id="searchFilterValueByItemName" resultType="java.lang.String">
- <choose>
- <when test="itemName == 'contentId'">
- select content_trace_id
- from publish_single_video_source
- <where>
- <if test="searchKeyword != null and searchKeyword !=''">
- and content_trace_id like concat('%', #{searchKeyword}, '%')
- </if>
- </where>
- order by crawler_timestamp desc
- limit 100
- </when>
- <when test="itemName == 'auditAccount'">
- select distinct video_pool_audit_account
- from publish_single_video_source
- <where>
- <if test="searchKeyword != null and searchKeyword !=''">
- and video_pool_audit_account like concat('%', #{searchKeyword}, '%')
- </if>
- </where>
- order by crawler_timestamp desc
- limit 100
- </when>
- <when test="itemName == 'title'">
- select distinct article_title
- from publish_single_video_source
- <where>
- <if test="searchKeyword != null and searchKeyword !=''">
- and article_title like concat('%', #{searchKeyword}, '%')
- </if>
- </where>
- order by crawler_timestamp desc
- limit 100
- </when>
- </choose>
- </select>
- <update id="updateArticleTitle">
- update publish_single_video_source
- set old_article_title = article_title,
- article_title = #{param.title},
- article_title_update_account = #{param.updateAccount},
- article_title_update_timestamp = #{updateTime}
- where content_trace_id = #{param.contentId}
- </update>
- <update id="updateVideoTitle">
- update publish_single_video_source
- set old_mini_program_title = mini_program_title,
- mini_program_title = #{param.title},
- mini_program_title_update_account = #{param.updateAccount},
- mini_program_title_update_timestamp = #{updateTime}
- where content_trace_id = #{param.contentId}
- </update>
- </mapper>
|