增加企微跑批记录用于重跑去重
This commit is contained in:
@@ -14,6 +14,13 @@
|
||||
WHERE tovm.is_deleted = 0
|
||||
AND tovm.msg_time between #{statTime} and #{endTime}
|
||||
AND tovm.chat_type = 0
|
||||
<if test="retry==true">
|
||||
and not exists(
|
||||
select 1 from tt_vdqw_record t
|
||||
where t.from_accept_user_id = CONCAT(LEAST(tovm.from_user_id, tovm.accept_user_id),'_',GREATEST(tovm.from_user_id, tovm.accept_user_id))
|
||||
AND t.msg_time between #{statTime} and #{endTime}
|
||||
)
|
||||
</if>
|
||||
GROUP BY
|
||||
LEAST(tovm.from_user_id, tovm.accept_user_id),
|
||||
GREATEST(tovm.from_user_id, tovm.accept_user_id)
|
||||
@@ -26,12 +33,20 @@
|
||||
tovm.from_user_id as fromUserId,
|
||||
tovm.accept_user_id as acceptUserId,
|
||||
tovm.msg_time as msgTime,
|
||||
tovm.chat_type as chatType
|
||||
tovm.chat_type as chatType,
|
||||
CONCAT(LEAST(tovm.from_user_id, tovm.accept_user_id),'_',GREATEST(tovm.from_user_id, tovm.accept_user_id)) as fromAcceptUserId
|
||||
FROM
|
||||
`tm_ods_vdqw_messagearchiving` tovm
|
||||
WHERE tovm.is_deleted = 0
|
||||
AND tovm.msg_time between #{statTime} and #{endTime}
|
||||
AND tovm.chat_type = 0
|
||||
<if test="retry==true">
|
||||
and not exists(
|
||||
select 1 from tt_vdqw_record t
|
||||
where t.from_accept_user_id = CONCAT(LEAST(tovm.from_user_id, tovm.accept_user_id),'_',GREATEST(tovm.from_user_id, tovm.accept_user_id))
|
||||
AND t.msg_time between #{statTime} and #{endTime}
|
||||
)
|
||||
</if>
|
||||
GROUP BY
|
||||
LEAST(tovm.from_user_id, tovm.accept_user_id),
|
||||
GREATEST(tovm.from_user_id, tovm.accept_user_id)
|
||||
|
||||
Reference in New Issue
Block a user