1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?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.crawler.CrawlerBaseMapper">
- <insert id="batchInsertAccountCorrelation">
- INSERT INTO account_correlation (date_str, gh_id, account_name, rel_gh_id, rel_account_name, status, correlation)
- VALUES
- <foreach collection="list" item="item" separator=",">
- (#{item.dateStr}, #{item.ghId}, #{item.accountName}, #{item.relGhId}, #{item.relAccountName}, #{item.status}, #{item.correlation})
- </foreach>
- </insert>
- <select id="countGetOffVideos" resultType="java.lang.Integer">
- select count(1) from get_off_videos where publish_time > 1727239202
- </select>
- <select id="pageGetOffVideos" resultType="com.tzld.longarticle.recommend.server.model.dto.GetOffVideos">
- select * from get_off_videos order by video_id limit #{offset}, #{pageSize}
- </select>
- <select id="countLongArticlesRootSourceId" resultType="java.lang.Integer">
- select count(1) from long_articles_root_source_id where requestTime > 1727192229
- </select>
- <select id="pageLongArticlesRootSourceId" resultType="com.tzld.longarticle.recommend.server.model.entity.longArticle.LongArticlesRootSourceId">
- select * from long_articles_root_source_id where requestTime > 1727192229 order by rootSourceId limit #{offset}, #{pageSize}
- </select>
- <select id="countArticleMatchVideos" resultType="java.lang.Integer">
- select count(1) from article_match_videos where DATE(update_time) >= '2024-09-20'
- </select>
- <select id="pageArticleMatchVideos"
- resultType="com.tzld.longarticle.recommend.server.model.dto.ArticleMatchVideos">
- select * from article_match_videos order by video_id
- </select>
- <select id="countLongArticlesVideos" resultType="java.lang.Integer">
- select count(1) from long_articles_video where content_status = 2 and success = 0
- </select>
- <select id="pageLongArticlesVideos"
- resultType="com.tzld.longarticle.recommend.server.model.dto.LongArticlesVideoDTO">
- select * from long_articles_video where content_status = 2 and success = 0 and id > #{id} order by id limit #{pageSize}
- </select>
- <select id="getLongArticlesText" resultType="com.tzld.longarticle.recommend.server.model.dto.LongArticlesText">
- select content_id, kimi_title, kimi_summary, kimi_keys from long_articles_video where kimi_summary is not null group by content_id
- </select>
- <select id="getLongArticlesVideo"
- resultType="com.tzld.longarticle.recommend.server.model.dto.LongArticlesVideoDTO">
- select * from long_articles_video where trace_id in
- <foreach collection="traceIds" item="item" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </select>
- <insert id="batchInsertAccountAvgInfo">
- INSERT INTO account_avg_info_v3
- (gh_id, position, update_time, account_name, fans, read_avg, like_avg, status, account_type, account_mode,
- account_source, account_status, business_type, read_rate_avg)
- VALUES
- <foreach collection="list" item="item" separator=",">
- (#{item.ghId}, #{item.position}, #{item.updateTime}, #{item.accountName}, #{item.fans}, #{item.readAvg},
- #{item.likeAvg}, #{item.status}, #{item.accountType}, #{item.accountMode}, #{item.accountSource},
- #{item.accountStatus}, #{item.businessType}, #{item.readRateAvg})
- </foreach>
- </insert>
- <delete id="deleteAccountAvgInfoByGhIdAndUpdateTime">
- delete from account_avg_info_v3 where gh_id = #{ghId} and update_time = #{date}
- </delete>
- <update id="updateAccountAvgInfoStatus">
- update account_avg_info_v3 set status = 0 where gh_id = #{ghId} and update_time != #{date}
- </update>
- <update id="updateArticleAigcId">
- update official_articles_v2
- set publish_content_id = #{publishContentId},
- channel_content_id = #{channelContentId}
- where wx_sn = #{wxsn}
- </update>
- <update id="updateArticleSourceRootId">
- update official_articles_v2
- set source_publish_content_id = #{sourcePublishContentId},
- root_publish_content_id = #{rootPublishContentId},
- root_produce_content_id = #{rootProduceContentId}
- where wx_sn = #{wxsn}
- </update>
- <select id="getWaitingFindArticle"
- resultType="com.tzld.longarticle.recommend.server.model.entity.crawler.Article">
- select * from official_articles_v2 where publish_timestamp > #{timestamp} order by publish_timestamp limit 100
- </select>
- </mapper>
|