|
@@ -68,8 +68,9 @@ public class MyConsumer extends Consumer<ConsumerDto> {
|
|
private void submitZip(ConsumerDto dto,File zfile) {
|
|
private void submitZip(ConsumerDto dto,File zfile) {
|
|
List<String> cs=dto.getIc().getCourses().stream().map(e->e.getCode()).collect(Collectors.toList());
|
|
List<String> cs=dto.getIc().getCourses().stream().map(e->e.getCode()).collect(Collectors.toList());
|
|
Map<String, String> params = Maps.newHashMap();
|
|
Map<String, String> params = Maps.newHashMap();
|
|
|
|
+ String courseCodes=StringUtils.join(cs,",");
|
|
params.put("rootOrgId", dto.getRootOrgId());
|
|
params.put("rootOrgId", dto.getRootOrgId());
|
|
- params.put("courseCodes",StringUtils.join(cs,","));
|
|
|
|
|
|
+ params.put("courseCodes",courseCodes);
|
|
Map<String, String> headers = Maps.newHashMap();
|
|
Map<String, String> headers = Maps.newHashMap();
|
|
headers.put("key", dto.getKey());
|
|
headers.put("key", dto.getKey());
|
|
headers.put("token", dto.getToken());
|
|
headers.put("token", dto.getToken());
|
|
@@ -80,7 +81,7 @@ public class MyConsumer extends Consumer<ConsumerDto> {
|
|
// OKHttpUtil.initOkHttpClient();
|
|
// OKHttpUtil.initOkHttpClient();
|
|
resp = OKHttpUtil.call(HttpMethod.POST, dto.getHost()+"/api/ecs_ques/importYunkaiPaper", headers, params, fileList);
|
|
resp = OKHttpUtil.call(HttpMethod.POST, dto.getHost()+"/api/ecs_ques/importYunkaiPaper", headers, params, fileList);
|
|
if (resp.code() != 200) {
|
|
if (resp.code() != 200) {
|
|
- throw new Exception(zfile.getName() + ":body:" + resp.body().string());
|
|
|
|
|
|
+ throw new Exception(zfile.getName() +"| courseCodes:"+courseCodes+ "| body:" + resp.body().string());
|
|
}else {
|
|
}else {
|
|
logger.debug("成功处理:" + zfile.getName() );
|
|
logger.debug("成功处理:" + zfile.getName() );
|
|
}
|
|
}
|