浏览代码

根据用户ID查询一对一聊天对话框错误修复

沈静伟 3 年之前
父节点
当前提交
c75c74cef0

+ 2 - 1
src/dsb/com/cnd3b/restcontroller/system/im/imdialog/SQL/根据用户ID查询一对一聊天对话框ID.sql

@@ -1,4 +1,5 @@
 select t1.timdialogid from timdialogusers t1
 inner join timdialog t2 on t1.siteid=t2.siteid and t1.timdialogid=t2.timdialogid
-where t1.siteid=$siteid$ and t2.fimdialogtype='ÆÕͨ' and exists(select *from timdialogusers where siteid=t1.siteid and timdialogid=t1.timdialogid and tenterprise_userid in $tenterprise_userid$ )
+where t1.siteid=$siteid$ and t2.fimdialogtype='ÆÕͨ'
+and exists(select timdialogid from timdialogusers where siteid=t1.siteid and timdialogid=t1.timdialogid and tenterprise_userid in $tenterprise_userid$ group by timdialogid having count(timdialogid)=2)
 group by t1.timdialogid having count(0)=2