沈静伟 3 gadi atpakaļ
vecāks
revīzija
92b813a0ff

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/customer/supplyanddemand/SQL/供需列表查询.sql

@@ -12,7 +12,7 @@ t1.fenddate,
 t2.fagentname,
 t1.freadtimes,
 t1.tenterprise_userid,
-       t1.tagentsid,
+t1.tagentsid,
 (select count(0) from timdialog where siteid=t1.siteid and ownertable='tsupplyanddemand' and ownerid=t1.tsupplyanddemandid) as fcommunicationtimes
 from tsupplyanddemand t1
 inner join tagents t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid

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

@@ -4,4 +4,5 @@ select siteid,timdialogid,MAX(timdialogmessageid)timdialogmessageid from timdial
 where siteid=$siteid$ and timdialogid in $timdialogid$ and tenterprise_userid = $userid$
 group by siteid,timdialogid
 )t2 on t1.siteid=t2.siteid and t1.timdialogid=t2.timdialogid and t1.timdialogmessageid=t2.timdialogmessageid
-left join timdialogusers t3 on t1.siteid=t3.siteid and t1.timdialogid=t3.timdialogid and t1.tenterprise_userid=t3.tenterprise_userid
+left join timdialogusers t3 on t1.siteid=t3.siteid and t1.timdialogid=t3.timdialogid and t1.tenterprise_userid=t3.tenterprise_userid
+where t1.ownertable='tsupplyanddemand'

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

@@ -93,11 +93,11 @@ public class supplyanddemand extends Controller {
             }
             drow.put("latestnews", newmsgrows);//最新消息
         }
-        RowsMap map = dialogrows.toRowsMap("timdialogid");
+        RowsMap map = dialogrows.toRowsMap("ownerid");
 
         for (Row row : rows) {
-            System.err.println("row:"+row.getString("timdialogid"));
-            row.put("imdialogs", map.get(row.getString("timdialogid")));
+            System.err.println("row:"+row.getString("tsupplyanddemandid"));
+            row.put("imdialogs", map.get(row.getString("tsupplyanddemandid")));
             //附件信息
             row.put("attinfos", attinfoRowsMap.get(row.getString("tsupplyanddemandid")));
             //创建者头像