瀏覽代碼

修复供需列表查询接口

吴志根 4 年之前
父節點
當前提交
f91930f165
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      src/dsb/com/cnd3b/restcontroller/customer/supplyanddemand/supplyanddemand.java

+ 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);//×îÐÂÏûÏ¢