Jelajahi Sumber

修复供需列表查询接口

吴志根 4 tahun lalu
induk
melakukan
f91930f165

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

@@ -84,7 +84,15 @@ public class supplyanddemand extends Controller {
         for (Row drow : dialogrows) {
             Rows newmsgrows = newmsgmap.get(drow.getString("timdialogid"));
             for (Row newmsg : newmsgrows) {
-                newmsg.put("message", JSONObject.parseObject(newmsg.getString("message")));
+                System.err.println(newmsg.getString("message"));
+                try {
+                    newmsg.put("message", JSONObject.parseObject(newmsg.getString("message")));
+                }catch (Exception e){
+                    e.printStackTrace();
+                    newmsg.put("message", "{}");
+                }
+
+
                 newmsg.put("fisonline", parameter.websocketClients.containsKey(newmsg.getLong("tenterprise_userid")) ? 1 : 0);
             }
             drow.put("latestnews", newmsgrows);//×îÐÂÏûÏ¢