提交 00cd5b26 authored 作者: inroi's avatar inroi

完成代码

上级 e9dc9949
......@@ -85,22 +85,20 @@ public class ToDoTaskServiceImpl implements IToDoTaskService {
reqeust.put("h5url", "");
reqeust.put("appParam", "");
Console.log("reqeust:" + JsonUtil.toString(reqeust));
String result = HttpClientUtil.sendPost(url + "/seeyon/rest/thirdpartyPending/receive?token=" + temp.get("id"), JsonUtil.toString(reqeust));
System.out.println("---------------->" + result);
tempList.add(reqeust);
}
String para = JsonUtil.toString(tempList);
Console.log("para:" + para);
String result = HttpClientUtil.sendPost(url + "/seeyon/rest/thirdpartyPending/receive?token=" + temp.get("id"), para);
System.out.println("---------------->" + result);
Map<String, Object> map = JsonUtil.toMap(result, String.class, Object.class);
if (CollectionUtils.isEmpty(map)) {
return RestResponse.fail("无返回值");
}
if ("false".equals(map.get("success"))) {
List<Object> errorList = JsonUtil.toList(JsonUtil.toString(map.get("errorMsgs")), Object.class);
String errorDetail = errorList.stream().map(m -> (String) JsonUtil.toMap(JsonUtil.toString(m), String.class, Object.class).get("errorDetail")).collect(Collectors.joining(", "));
return RestResponse.fail(errorDetail);
}
//Map<String, Object> map = JsonUtil.toMap(result, String.class, Object.class);
//if (CollectionUtils.isEmpty(map)) {
// return RestResponse.fail("无返回值");
//}
//if ("false".equals(map.get("success"))) {
// List<Object> errorList = JsonUtil.toList(JsonUtil.toString(map.get("errorMsgs")), Object.class);
// String errorDetail = errorList.stream().map(m -> (String) JsonUtil.toMap(JsonUtil.toString(m), String.class, Object.class).get("errorDetail")).collect(Collectors.joining(", "));
// return RestResponse.fail(errorDetail);
//}
return RestResponse.success();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论