@RequestMapping("/makeUserWB")
public Response<?> makeUserWB(@RequestParam("userIds")String userIds, @RequestParam("subjectId")int subjectId){
try {
String[] us=userIds.split(",");
List<String> list = new ArrayList<String>();
for(String userId : us) {
Long userId1 = DataTypeUtil.toLong(userId);
String path = wrongBookService.productDateRangPdfA4(userId1, subjectId, null, null, 1);
list.add(path);
}
//如果分割后大于1,打成压缩包
if(list.size()>1) {
}else {
Long userId1 = DataTypeUtil.toLong(userIds);
String path = wrongBookService.productDateRangPdfA4(userId1, subjectId, null, null, 1);
return Response.success("生成成功!", path);
}
} catch (Exception e) {
logger.error("", e);
return Response.error(e);
}
return null;
}
问题已解决,已发表在我的博客中https://blog.csdn.net/mj94520/article/details/101201317