Browse Source

群成员添加时,如果该成员已存在,则自动将其从移除状态恢复

沈静伟 3 years ago
parent
commit
dafc326140

+ 3 - 1
src/dsb/com/cnd3b/restcontroller/customer/supplyanddemand/SQL/即时通讯群人员添加.sql

@@ -7,4 +7,6 @@ select @timdialogusersid + ROW_NUMBER() over (order by t1.fname),
        t1.siteid, $createby$, $createby$, getdate(), getdate(), 0, null,0,t1.fname, t1.tenterprise_userid,$timdialogid$,0
 from tenterprise_users t1
 where t1.siteid=$siteid$ and t1.tenterprise_userid in $tenterprise_userid$
-and not exists(select * from timdialogusers where siteid=$siteid$ and timdialogid=$timdialogid$ and tenterprise_userid=t1.tenterprise_userid )
+and not exists(select * from timdialogusers where siteid=$siteid$ and timdialogid=$timdialogid$ and tenterprise_userid=t1.tenterprise_userid )
+
+update timdialogusers set fisremove=0 where fisremove=1 and siteid=$siteid$ and timdialogid=$timdialogid$ and tenterprise_userid in $tenterprise_userid$