Commit 514707f0 by 吴善钰

积分串并接口,调整jsonArray转list方式

parent fbc5e4a2
......@@ -99,20 +99,13 @@ public class GwdqfxtjController {
}
HttpPost post = new HttpPost(cjJfcbUrl);
post.setEntity(reqEntity);
JSONArray jsonArray;
List<AutoTbStAsjforjfcb> list = new ArrayList<>();
String content = gwdqService.RequestUtil(httpclient, post).trim();
System.out.println("content=="+content);
if(null != content && !"".equals(content)){
jsonArray = JSONArray.parseArray(content);
JSONArray jsonArray = JSONArray.parseArray(content);
if(jsonArray != null && jsonArray.size() > 0) {
for (int i = 0; i <= jsonArray.size() - 1; i++){
AutoTbStAsjforjfcb autoTbStAsjforjfcb;
JSONObject ajxxObj = jsonArray.getJSONObject(i);
System.out.println("ajxxObj==="+ajxxObj);
autoTbStAsjforjfcb = ajxxObj.toJavaObject(AutoTbStAsjforjfcb.class);
list.add(autoTbStAsjforjfcb);
}
list = jsonArray.toJavaList(AutoTbStAsjforjfcb.class);
}
}
return list;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment