Quellcode durchsuchen

修复我的供需列表详情bug

吴志根 vor 3 Jahren
Ursprung
Commit
7a31342860

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

@@ -1,7 +1,7 @@
 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$
+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

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

@@ -69,12 +69,14 @@ public class supplyanddemand extends Controller {
         dialoglistSQL.addParameter("userid",userid);
         dialoglistSQL.addParameter_in("tsupplyanddemandid", rows.toArrayList("tsupplyanddemandid"));
         System.err.println(dialoglistSQL.getSQL());
+
         Rows dialogrows = dbConnect.runSqlQuery(dialoglistSQL.getSQL());
 
         SQLFactory timnewmsgSQL = new SQLFactory(this, "即时通讯群最新消息查询");
         timnewmsgSQL.addParameter("siteid", siteid);
         timnewmsgSQL.addParameter("userid",userid);
         timnewmsgSQL.addParameter_in("timdialogid", dialogrows.toArrayList("timdialogid"));
+        System.err.println(timnewmsgSQL.getSQL());
         RowsMap newmsgmap = timnewmsgSQL.runSqlQuery().toRowsMap("timdialogid");
         for (Row drow : dialogrows) {
             Rows newmsgrows = newmsgmap.get(drow.getString("timdialogid"));