Przeglądaj źródła

新增更新群成员信息接口

沈静伟 3 lat temu
rodzic
commit
f3c8df9d83

+ 3 - 1
src/dsb/com/cnd3b/restcontroller/system/im/imdialog/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,createdate=getdate() where siteid=$siteid$ and timdialogid=$timdialogid$ and tenterprise_userid in $tenterprise_userid$

+ 18 - 0
src/dsb/com/cnd3b/restcontroller/system/im/imdialog/imdialog.java

@@ -261,6 +261,24 @@ public class imdialog extends Controller {
         return query_imdialogMain();
     }
 
+    /**
+     * 更新群成员信息
+     *
+     * @return
+     */
+    public String updateDialoguser() {
+        long timdialogid = content.getLongValue("timdialogid");
+        long tenterprise_userid = content.getLong("tenterprise_userid");
+        String fimdialognotes = content.getString("fimdialognotes");
+        int fisremove = content.getIntValue("fisremove");
+        String status = dbConnect.runSqlUpdate("update timdialogusers set fisremove=" + fisremove + ",fimdialognotes='"+fimdialognotes+"' where siteid='" + siteid + "' and timdialogid='" + timdialogid + "' and tenterprise_userid='" + tenterprise_userid + "'");
+        if ("true".equalsIgnoreCase(status)) {
+            return getSucReturnObject().toString();
+        } else {
+            return getErrReturnObject().toString();
+        }
+    }
+
     /**
      * 创建聊天话题
      *