|

楼主 |
发表于 2018-1-8 22:04:26
|
显示全部楼层
可以了,是要快了好几倍
table = DataUtils.queryData(conn, sql, null, null, null, null);
data1 = Transform.tableToJson(table);
JSONArray rows = data1.getJSONArray("rows");
logger.info("---------- --" + rows.size());
for (int i = 0; i < rows.size(); i++) {
JSONObject rowsinfo = rows.getJSONObject(i);
JSONObject userdata = rowsinfo.getJSONObject("userdata");
userdata.put("recordState", "new");
}
} catch (Exception e) {
System.out.println("连接数据库失败!");
} finally {
conn.close();
}
return data1; |
|