* @throws Exception
*/
@RequestMapping(value="/file/download/{fileId}")
public void downloadFile(@PathVariable("fileId") Long fileId, HttpServletResponse response) throws Exception {
//String realPath = request.getSession().getServletContext().getRealPath("/")+ basePath;
Data param = new Data();
param.add("fileId", fileId);
String ids = param.getString("fileId");
ids = ids.replaceAll("\r", "");
ids = ids.replaceAll("\n", "");
if (ids.contains(";")) {
ids = ids.substring(0, ids.indexOf(";"));
}
param.add("fileId", Integer.parseInt(ids));
Data result = fileService.getFile(param);
fileUtil.downloadFile(response,
request,
result.getString("dirType") + "/" + result.getString("phyPath"),
result.getString("phyName"),
result.getString("fileName"));
}