123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- <?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.ArticleAuditMapper">
- <select id="articleVideoAuditListCount" resultType="java.lang.Integer">
- select count(lata.content_id)
- from long_articles_title_audit lata
- left join long_articles_text lat on lata.content_id = lat.content_id
- <where>
- <if test="status!= null and status.size() > 0">
- and lata.status in
- <foreach collection="status" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="contentId!= null and contentId.size() > 0">
- and lata.content_id in
- <foreach collection="contentId" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="title!= null and title.size() > 0">
- and lat.article_title in
- <foreach collection="title" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="auditAccount!= null and auditAccount.size() > 0">
- and lata.audit_account in
- <foreach collection="auditAccount" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- </where>
- </select>
- <select id="articleVideoAuditList"
- resultType="com.tzld.longarticle.recommend.server.model.vo.ArticleVideoAuditListVO">
- select lata.content_id, lata.status, lat.article_title as title, lat.kimi_title,
- lata.audit_account, lata.audit_timestamp, lata.flow_pool_level
- from long_articles_title_audit lata
- left join long_articles_text lat on lata.content_id = lat.content_id
- <where>
- <if test="status!= null and status.size() > 0">
- and lata.status in
- <foreach collection="status" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="contentId!= null and contentId.size() > 0">
- and lata.content_id in
- <foreach collection="contentId" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="title!= null and title.size() > 0">
- and lat.article_title in
- <foreach collection="title" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- <if test="auditAccount!= null and auditAccount.size() > 0">
- and lata.audit_account in
- <foreach collection="auditAccount" item="item" separator="," open="(" close=")">
- #{item}
- </foreach>
- </if>
- </where>
- <choose>
- <when test="poolLevelDesc != null and poolLevelDesc != ''">
- order by lata.flow_pool_level ${poolLevelDesc}, lata.content_id desc
- </when>
- <otherwise>
- order by lata.content_id desc
- </otherwise>
- </choose>
- limit #{offset}, #{pageSize}
- </select>
- <update id="updateCrawlerVideoIsIllegal">
- update long_articles_crawler_videos
- set is_illegal = #{isIllegal}
- where id in
- <foreach collection="ids" item="id" open="(" close=")">
- #{id}
- </foreach>
- </update>
- <select id="searchFilterValueByItemName" resultType="java.lang.String">
- <choose>
- <when test="itemName == 'contentId'">
- select content_id
- from long_articles_title_audit
- <where>
- <if test="searchKeyword != null and searchKeyword !=''">
- and content_id like concat('%', #{searchKeyword}, '%')
- </if>
- </where>
- order by create_timestamp desc
- limit 100
- </when>
- <when test="itemName == 'auditAccount'">
- select distinct audit_account
- from long_articles_title_audit
- <where>
- <if test="searchKeyword != null and searchKeyword !=''">
- and audit_account like concat('%', #{searchKeyword}, '%')
- </if>
- </where>
- order by create_timestamp desc
- limit 100
- </when>
- <when test="itemName == 'title'">
- select distinct long_articles_text.article_title
- from long_articles_title_audit
- left join long_articles_text on long_articles_title_audit.content_id = long_articles_text.content_id
- <where>
- <if test="searchKeyword != null and searchKeyword !=''">
- and long_articles_text.article_title like concat('%', #{searchKeyword}, '%')
- </if>
- </where>
- order by long_articles_title_audit.create_timestamp desc
- limit 100
- </when>
- </choose>
- </select>
- <update id="updateArticleTitle">
- update long_articles_text
- set old_article_title = article_title,
- article_title = #{param.title},
- article_title_update_account = #{param.updateAccount},
- article_title_update_timestamp = #{updateTime}
- where content_id = #{param.contentId}
- </update>
- <update id="updateVideoTitle">
- update long_articles_text
- set old_kimi_title = kimi_title,
- kimi_title = #{param.title},
- kimi_title_update_account = #{param.updateAccount},
- kimi_title_update_timestamp = #{updateTime}
- where content_id = #{param.contentId}
- </update>
- <update id="updateTitleAuditFlowPoolLevel">
- update long_articles_title_audit lat
- join ( SELECT DISTINCT lamv.content_id, lamv.flow_pool_level
- FROM long_articles_match_videos lamv
- JOIN long_articles_title_audit lata ON lamv.content_id = lata.content_id
- where lata.flow_pool_level is null) lamv ON lat.content_id = lamv.content_id
- set lat.flow_pool_level = lamv.flow_pool_level
- where lat.flow_pool_level is null
- </update>
- </mapper>
|