Browse Source

群列表新增对象是否在线字段

沈静伟 3 years ago
parent
commit
7b07886375

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/customer/supplyanddemand/SQL/即时通讯群最新消息查询.sql

@@ -1,4 +1,4 @@
-select t1.timdialogid,t1.fmessagetype as message,t1.fmessageobj,t3.fname,t1.createdate,t1.ownertable,t1.ownerid from timdialogmessage t1
+select t1.timdialogid,t1.fmessagetype as message,t1.fmessageobj,t3.fname,t1.createdate,t1.ownertable,t1.ownerid,t1.tenterprise_userid from timdialogmessage t1
 inner join (
 select siteid,timdialogid,MAX(timdialogmessageid)timdialogmessageid from timdialogmessage
 where siteid=$siteid$ and timdialogid in $timdialogid$ and tenterprise_userid != $userid$

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/customer/supplyanddemand/SQL/我的供需详情查询_对话框列表.sql

@@ -1,4 +1,4 @@
-select t1.timdialogid,t1.createdate,t4.fagentname,t2.fname,t2.funreadmsgcount,fdatastatus from timdialog t1
+select t1.timdialogid,t1.createdate,t4.fagentname,t2.tenterprise_userid,t2.fname,t2.funreadmsgcount,fdatastatus from timdialog t1
 inner join timdialogusers t2 on t1.siteid=t2.siteid and t1.timdialogid=t2.timdialogid
 inner join tenterprise_users t3 on t2.siteid=t3.siteid and t2.tenterprise_userid=t3.tenterprise_userid
 inner join tagents t4 on t3.siteid=t4.siteid and t3.tagentsid=t4.tagentsid

+ 3 - 0
src/dsb/com/cnd3b/restcontroller/customer/supplyanddemand/supplyanddemand.java

@@ -8,6 +8,7 @@ import com.cnd3b.common.data.Row;
 import com.cnd3b.common.data.Rows;
 import com.cnd3b.common.data.RowsMap;
 import com.cnd3b.common.data.SQLFactory;
+import com.cnd3b.common.parameter.parameter;
 import p2.pao.PaoRemote;
 import p2.pao.PaoSetRemote;
 import p2.util.P2Exception;
@@ -79,6 +80,7 @@ public class supplyanddemand extends Controller {
             Rows newmsgrows = newmsgmap.get(drow.getString("timdialogid"));
             for (Row newmsg : newmsgrows) {
                 newmsg.put("message", JSONObject.parseObject(newmsg.getString("message")));
+                newmsg.put("fisonline", parameter.websocketClients.containsKey(newmsg.getLong("tenterprise_userid")) ? 1 : 0);
             }
             drow.put("latestnews", newmsgrows);//×îÐÂÏûÏ¢
         }
@@ -244,6 +246,7 @@ public class supplyanddemand extends Controller {
             Rows newmsgrows = newmsgmap.get(row.getString("timdialogid"));
             for (Row newmsg : newmsgrows) {
                 newmsg.put("message", JSONObject.parseObject(newmsg.getString("message")));
+                newmsg.put("fisonline", parameter.websocketClients.containsKey(newmsg.getLong("tenterprise_userid")) ? 1 : 0);
             }
             row.put("latestnews", newmsgrows);//×îÐÂÏûÏ¢
         }

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/system/im/imdialog/SQL/即时通讯普通群最新消息查询.sql

@@ -1,4 +1,4 @@
-select t1.timdialogid,t1.fmessagetype,t1.fmessageobj as message,t3.fname,t1.createdate,t1.ownertable,t1.ownerid from timdialogmessage t1
+select t1.timdialogid,t1.fmessagetype,t1.fmessageobj as message,t3.fname,t1.createdate,t1.ownertable,t1.ownerid,t1.tenterprise_userid from timdialogmessage t1
 inner join (
 select siteid,timdialogid,MAX(timdialogmessageid)timdialogmessageid from timdialogmessage
 where siteid=$siteid$ and timdialogid in $timdialogid$

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

@@ -70,6 +70,7 @@ public class imdialog extends Controller {
             Rows newmsgrows = newmsgmap.get(row.getString("timdialogid"));
             for (Row newmsg : newmsgrows) {
                 newmsg.put("message", JSONObject.parseObject(newmsg.getString("message")));
+                newmsg.put("fisonline", parameter.websocketClients.containsKey(newmsg.getLong("tenterprise_userid")) ? 1 : 0);
             }
             row.put("latestnews", newmsgrows);//×îÐÂÏûÏ¢