|
@@ -3,30 +3,30 @@
|
|
|
<mapper namespace="com.tzld.longarticle.recommend.server.mapper.longArticle.ArticleAuditMapper">
|
|
|
|
|
|
<select id="articleVideoAuditListCount" resultType="java.lang.Integer">
|
|
|
- select count(long_articles_title_audit.content_id)
|
|
|
- from long_articles_title_audit
|
|
|
- left join long_articles_text on long_articles_title_audit.content_id = long_articles_text.content_id
|
|
|
+ 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 long_articles_title_audit.status in
|
|
|
+ and lata.status in
|
|
|
<foreach collection="status" item="item" separator="," open="(" close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
<if test="contentId!= null and contentId.size() > 0">
|
|
|
- and long_articles_title_audit.content_id in
|
|
|
+ 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 long_articles_text.article_title in
|
|
|
+ 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 long_articles_title_audit.audit_account in
|
|
|
+ and lata.audit_account in
|
|
|
<foreach collection="auditAccount" item="item" separator="," open="(" close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
@@ -36,38 +36,44 @@
|
|
|
|
|
|
<select id="articleVideoAuditList"
|
|
|
resultType="com.tzld.longarticle.recommend.server.model.vo.ArticleVideoAuditListVO">
|
|
|
- select long_articles_title_audit.content_id, long_articles_title_audit.status,
|
|
|
- long_articles_text.article_title as title, long_articles_text.kimi_title,
|
|
|
- long_articles_title_audit.audit_account, long_articles_title_audit.audit_timestamp
|
|
|
- from long_articles_title_audit
|
|
|
- left join long_articles_text on long_articles_title_audit.content_id = long_articles_text.content_id
|
|
|
+ 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 long_articles_title_audit.status in
|
|
|
+ and lata.status in
|
|
|
<foreach collection="status" item="item" separator="," open="(" close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
<if test="contentId!= null and contentId.size() > 0">
|
|
|
- and long_articles_title_audit.content_id in
|
|
|
+ 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 long_articles_text.article_title in
|
|
|
+ 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 long_articles_title_audit.audit_account in
|
|
|
+ and lata.audit_account in
|
|
|
<foreach collection="auditAccount" item="item" separator="," open="(" close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
</where>
|
|
|
- order by long_articles_title_audit.content_id desc
|
|
|
+ <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>
|
|
|
|
|
@@ -137,4 +143,14 @@
|
|
|
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>
|