@@ -230,10 +230,9 @@
(
select count(*)
from groups_relation gr
- where gr.status = 'outside'
- and gr.groups_id = gt.id
+ where gr.groups_id = gt.id
and gr.user_id
- != #{userId}) = 0
+ = #{userId}) = 0
order by RAND() limit 1
</select>
</mapper>