说明:将[a:12,b:12,c:34]转成["a":"12","b":"12","c":"34"]
List<dboViewGcLawenforcecert> dboviewgclawenforcecertlist = null;
dboviewgclawenforcecertlist = queryEntities(dboViewGcLawenforcecert.class, null, where, (intPage - 1) * number, number,
params);
List<Object> count = basedao.queryBySQL("select count(*) from " + dboViewGcLawenforcecert.TABLE_NAME, null,
null);
//list放到map里
Map<String, Object> jsonMap = new HashMap<String, Object>();
jsonMap.put("total", count == null ? 0 : count.get(0));
jsonMap.put("rows", dboviewgclawenforcecertlist);
//转换
JSONObject obj = JSONObject.fromObject(jsonMap);
return obj.toString();