提交 852f71fb 作者: 925993793@qq.com

Merge remote-tracking branch 'origin/event_new' into event_new

......@@ -281,27 +281,29 @@
iso.`status`,
iso.crawl_type,
iso.create_time,
sm.is_exempt_keyword,
sm.is_free_check
bind.is_exempt_keyword,
bind.is_free_check
FROM
info_source_group_map m
INNER JOIN info_source iso ON m.source_id = iso.id
INNER JOIN subject_info_source_map sm ON sm.source_id = m.group_id
<if test="subjectIds != null and subjectIds.size() > 0">
AND sm.subject_id IN
<foreach collection="subjectIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
WHERE
m.group_id IN ( SELECT source_id FROM subject_info_source_map WHERE type IN ( 2, 5 )
<if test="subjectIds != null and subjectIds.size() > 0">
and subject_id in
<foreach collection="subjectIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
GROUP BY source_id )
info_source iso left join (
select sm.source_id,sm.is_exempt_keyword,sm.is_free_check from subject_info_source_map sm where sm.type = 1
<if test="subjectIds != null and subjectIds.size() > 0">
and sm.subject_id in
<foreach collection="subjectIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
union
select m.source_id,n.is_exempt_keyword,n.is_free_check from subject_info_source_map n
inner join info_source_group_map m on n.source_id = m.group_id
where n.type = 2
<if test="subjectIds != null and subjectIds.size() > 0">
and n.subject_id in
<foreach collection="subjectIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
) bind on (iso.id = bind.source_id)
where bind.source_id is not null
<if test="sourceIds != null and sourceIds.size() > 0">
and iso.id in
<foreach collection="sourceIds" item="item" open="(" close=")" separator=",">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论