Procházet zdrojové kódy

供需列表及详情查询新增创建者头像查询

沈静伟 před 4 roky
rodič
revize
afce14c6c5

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

@@ -9,6 +9,7 @@ t1.checkdate,
 t1.fenddate,
 t2.fagentname,
 t1.freadtimes,
+t1.tenterprise_userid,
 (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

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

@@ -56,9 +56,12 @@ public class supplyanddemand extends Controller {
 
         Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
         RowsMap attinfoRowsMap = getAttachmentUrl("tsupplyanddemand", rows.toArrayList("tsupplyanddemandid"));
+
         for (Row row : rows) {
             //附件信息
             row.put("attinfos", attinfoRowsMap.get(row.getString("tsupplyanddemandid")));
+            //创建者头像
+            row.put("headportraiturl", getHeadPic(row.getLong("tenterprise_userid")));
         }
         return getSucReturnObject().setDataByPaging(rows).saveToDataPool().toString();
     }
@@ -84,6 +87,8 @@ public class supplyanddemand extends Controller {
 
         for (Row row : rows) {
             row.put("attinfos", attinfoRowsMap.get(row.getString("tsupplyanddemandid")));
+            //创建者头像
+            row.put("headportraiturl", getHeadPic(row.getLong("tenterprise_userid")));
 
             Rows imdialogRows = dbConnect.runSqlQuery("select timdialogid from timdialog where siteid='" + siteid + "' and ownertable='tsupplyanddemand' and ownerid='" + tsupplyanddemandid + "' and tenterprise_userid=" + userid);
             long timdialogid;
@@ -155,6 +160,8 @@ public class supplyanddemand extends Controller {
 
         for (Row row : rows) {
             row.put("attinfos", attinfoRowsMap.get(row.getString("tsupplyanddemandid")));
+            //创建者头像
+            row.put("headportraiturl", getHeadPic(userid));
         }
         return getSucReturnObject().setDataByPaging(rows).saveToDataPool().toString();
     }
@@ -183,6 +190,8 @@ public class supplyanddemand extends Controller {
         for (Row row : rows) {
             row.put("attinfos", attinfoRowsMap.get(row.getString("tsupplyanddemandid")));
             row.put("imdialogs", dialogrows);
+            //创建者头像
+            row.put("headportraiturl", getHeadPic(userid));
         }
 
         return getSucReturnObject().setData(rows).toString();