@PostMapping(“/download”)
@ResponseBody
public void downloadPdf(@RequestHeader String Authorization,@RequestBody Ability param,HttpServletRequest request, HttpServletResponse response) throws Exception{
List paths = new ArrayList();
try {
JSONArray result=param.getSpec();
for(int i=0;i<result.size();i++){
JSONObject obj=result.getJSONObject(i);//jsonarray对象通过getjsonobjext(index)方法取得数组里面的json
String content=obj.getString("content").replaceAll("http://116.62.217.58:17000/volunteer/20221215/","");//jsonobject对象通过key直接取得String的值
paths.add(content);
}
List<String> filePahts = new ArrayList<String>();
for (Object path : paths) {
// if(StringUtils.isEmpty(param.getStartDate())){
// strDate = new SimpleDateFormat(“yyyy-MM”).format(new Date());