1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?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>
- <insert id="batchInsertLongArticlesRootSourceId">
- INSERT INTO long_articles_root_source_id (rootSourceId, accountName, ghId, articleTitle, requestTime, trace_id,
- push_type, video_id)
- VALUES
- <foreach collection="list" item="item" separator=",">
- (#{item.rootSourceId}, #{item.accountName}, #{item.ghId}, #{item.articleTitle}, #{item.requestTime},
- #{item.traceId}, #{item.pushType}, #{item.videoId})
- </foreach>
- </insert>
- <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>
|