@SuppressWarnings({ "rawtypes", "unchecked" })
public void resultProc(ResponseMessage rspMsg, String jsonData) {
if (rspMsg.getStatusCode() == 200) {
String resultContent = rspMsg.getContent();
// 序列化方法使用Jackson为底包,可自行封装
Map<String, Object> resultMap = JSON.parseObject(resultContent,
new TypeReference<Map<String, Object>>() {
});
if ((Integer) resultMap.get("code") == 0) {
List<CompanyVO> list = JSON.parseArray(jsonData,
CompanyVO.class);
List<Integer> historyIds = new ArrayList<Integer>();
for (CompanyVO link : list) {
historyIds.add(link.getHistoryId());
}
Map<String, Object> params = new HashMap<String, Object>();
String msg = (String) resultMap.get("msg");
params.put("historyIds", historyIds);
params.put("msg", msg);
companyService.upSynFlag(params);
}
}
}
转载于:https://www.cnblogs.com/albert-think/p/6814265.html