Commit ba88fada by 王祖波

互动记录sql修改

parent e33317c2
......@@ -329,10 +329,10 @@
JOIN (
SELECT member_id, MAX(last_access_time) AS max_last_access_time
FROM tab_haoban_interact_record
WHERE clerk_id = #{clerkId} AND delete_flag = 0 and
WHERE clerk_id = #{clerkId} AND delete_flag = 0 and (
<foreach collection="list" item="item" separator=" OR ">
(member_id = #{item.memberId} AND last_access_time > #{item.lastAccessTime})
</foreach>
</foreach>)
GROUP BY member_id
) t2
ON t1.member_id = t2.member_id AND t1.last_access_time = t2.max_last_access_time
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment